[3.x] Add generics to PackedScene instance#589
Open
aaronfranke wants to merge 1 commit intogodotengine:3.xfrom
Open
[3.x] Add generics to PackedScene instance#589aaronfranke wants to merge 1 commit intogodotengine:3.xfrom
aaronfranke wants to merge 1 commit intogodotengine:3.xfrom
Conversation
akien-mga
reviewed
Sep 27, 2021
67c4734 to
736573a
Compare
Member
Author
|
I have no idea how to make the same change to GDExtension, so I changed the base of this PR to 3.x. |
736573a to
8d3a5bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #585 by adding a generic version of PackedScene instance.
To test this, here is a commit that modifies the new Dodge the Creeps with GDNative C++ to use this method: https://github.com/aaronfranke/gdnative-demos/commit/1d6fa3d37a8c312b9f6524949b32fc5cc7488999
TODO: I noticed that there is a bool called
use_template_get_node. I considered addinguse_template_packed_scene_instance, although I think this may be too much granularity. We should consider only supporting compiling with generics in the future if it doesn't have any downsides (the non-generic instance still works fine as of this PR).