|Topic was automatically imported from the old Question2Answer platform.
I have a world scene that routinely creates instances of another, smaller scene called Segment. Segment has a lot of internal stuff going on with many smaller parts that communicate with each other through signals. When I tested the logic of the world scene out with a less complex scene to instantiate, everything went fine. But when I swapped that less complex scene out with the actual Segment scene that I want to use, things started going awry.
Every time I instantiate one, I get a big frame rate drop, and then Godot prints the following error to the console:
connect: Signal 'my_signal' is already connected to given method 'my_method' in that object
It prints this for every single signal I have connected within Segment, which is like 10 (hence the framerate drop).
I do not connect any signals through code within Segment – every one is connected through the editor.
Here’s my code for instantiating a segment, which is in my World.gd script:
guy = Segment.instance()
guy.position.y = offset
where Segment is the name of a variable containing a preloaded PackedScene of my Segment scene.
The weirdest thing to me is that my test scene that I substituted Segment for also has a signal connected between two of its children, but I never get this error when instantiating the test scene. Is this just an issue of having too many signals?
EDIT: After a little more testing, I’ve found that I do not get these errors from the first two times I instantiate Segment, but I do get them for the third time I try to, and every time after that.