Godot Version
4.3 stable
Question
I have an info panel, which is a Control object, with several sprites and labels inside it, on a CanvasLayer in my World Scene.
Then, in the same World scene, I have a Node with an Area2d attached. The Area2d has a CollisionShape2D that covers the Area I want to detect. Attached to this same Node, I have a script, in which I connected the mouse_entered signal of the Area2D to make the info panel visible when the player mouses over that node. The info panel has a Unique Name and is referenced in an OnReady var in the script. This works fine and when I mouse over the node, the panel shows as expected.
The problem begins when I make a copy of the Node. Now the mouse_entered signal is only being detected on the copied Node, not on the original node. If I make multiple copies, the mouse_entered signal is only being detected on the last one created.
I made the CollisionShape2Ds unique for each pasted instance and that didn’t change the problem. I don’t see a way to make the Area2Ds unique.
What could be causing this?
edited to add further information After putting in some debug prints, the mouse_enter signal is being sent and received. The code is even going to the func where it turns the UI panel visible. It just fails to do that, except on the last one copied.