Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | TheZioba |
I know that in GDScript I can export a variable as a PackedScene with the syntax:
export (PackedScene) var Bullet
My question is: how can I do the same thing in GDNative C++ with the register_property() instruction, without obtaining a ‘Nil’ (NULL) value by the emitter of the signal in the function “shoot()”?
I know that a modular method of working says “calling down, signal up”, so I don’t want to call “get_parent()” in the function “shoot()”, just emit a signal with the reference to the Bullet as a PackedScene.