The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

When removing a child node and then re-adding it, I get 3 errors:

area_enter_tree: Condition "!E" is true.
connect: Signal 'tree_entered' is already connected to given method '_area_exit_tree' in that object.
connect: Signal 'tree_exiting' is already connected to given method '_area_exit_tree' in that object.

I've isolated the cause of these errors as best I could. They only occur when I am removing and re-adding a node with two Areas with accompanying CollisionShapes.

I made a very basic project that only requires running test.tscn. Press 1 to remove and add a test node with 2 Area children. Press 2 to remove and add a test node with 1 Area child. Errors only appear in the first case and they appear every time the node is re-added.

Here is the test project:

Godot version 3.2.3
in Engine by (97 points)

1 Answer

0 votes
by (887 points)

If I understand correctly, these errors are from signals that aren't disconnected when the node leaves the scene tree and they try to re-connect themselves when the node is added back.

Are these errors only warnings that the signal is trying to connect itself multiple times?

Yes. It should be safe, if you are not going to pass node to another scene.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.