godot-cpp icon indicating copy to clipboard operation
godot-cpp copied to clipboard

[3.x] Add generics to PackedScene instance

Open aaronfranke opened this issue 2 years ago • 1 comments

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 adding use_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).

aaronfranke avatar Jul 13 '21 02:07 aaronfranke

I have no idea how to make the same change to GDExtension, so I changed the base of this PR to 3.x.

aaronfranke avatar Sep 27 '21 13:09 aaronfranke