Hello, so I have a script that loads new level, but to add world scene to the main child I need to use CallDeferred. The problem is that after adding the world, I need to reconnect signals, but as I understand CallDeferred is called later, so how to make that it waits for CallDeferred to add world ? I've tried with Threads, but game just crashes without an error. Here's my code: `GetNode("/root/Main/"+level.ToString()).QueueFree(); level++; PackedScene world_s = (PackedScene)ResourceLoader.Load("res://Scenes/Playable/Worlds/" + level + ".tscn"); Node world = world_s.Instance() as Node; world.Name = level.ToString(); GetNode("/root/Main").CallDeferred("add_child", world);

GetNode("/root/Main/" + level + "/FinishPlatform").Connect("sFinishPlatform", this, "OnEndInteract");This part:GetNode("/root/Main/" + level + "/FinishPlatform")` is returning null.

(Not sure why, but this post was stuck in the moderation queue...)

Maybe let the added level itself do this on tree_entered() Or let it send back a signal upon tree_entered()

@wombatstampede said: Maybe let the added level itself do this on tree_entered() Or let it send back a signal upon tree_entered()

Thank you. I just reconnected on _Ready() in newly added level.

3 years later