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.