Scene branches mess up signals

Godot Version

4.5.1

Question

` I’m making a card game, where the cards are seperated scene get reused, and that whenever you hover with your mouse they get an outline. But as its stands all the cards get an outline when you hover over only one of them. This most likely happens because I use the build in signal system to connect the Area2Ds with their parent nodes and I wanna know to fix this.


`

Enable material’s resource_local_to_scene flag.

1 Like

Yes, probably this is the solution.
Just to give you more context, this is not related to your signals. Your signals are working individual to each scene as expected.

But all of the cards (scenes) share the same material if you don’t enable material’s resource_local_to_scene flag. Then when you enable the highlight through the shader, this highlight works for all of the cards, because it’s the same shader for all cards. You can think it something like a ‘static variable’ if it makes sense.

2 Likes