Hi !
I have a problem to understand how to use signals within instanced scenes.
Goal : display planets and make them disapear when clicking on it.
What I have done (code is in C#) :
1. create a scene Planet (StaticBody2D)
2. check the "Pickable" property
3. in the Ready() method, connect to the built-in "input_event" signal
Connect("input_event", this, "_onInputEvent");
? When I test the scene by itself, it is working.
Then :
1. create a Game scene
2. create instances of the Planet using PackedScene
[Export] private PackedScene PlanetScene;
...
Planet _planetInstance = (Planet)PlanetScene.Instance();
GetNode("Planets").AddChild(_planetInstance);
? The planets are created, but when I click on it, the "input_event" is not called anymore.
I tried to change the Planet's type to KinematicBody2D or Area2D, with no result.
Thanks for your help !