Hello to all,
First of all I'm new in GoDot so I make some simple examples in order to see how godot works.
I create my scene from Editor, so using script in c# I want to change Node from current parent, add to another parent in the same scene and reload a scene again in order to see the result directly.
I remove child from previous parent and add to the new parent, but I could not see the result in the current scene after play from Editor. Then I found that I have to call reload scene but I guess it stuck somewhere and the scene cannot be loaded (noting happened after Play from Editor - black screen and it looks like stuck in some loop). Can you please help me what can be problem here that I cannot reload my scene with new changes.
In addition part of my test code:
Node currScene = GetTree().CurrentScene;
if (currScene == null)
{
GetTree().CurrentScene = (Spatial)currProjectScene.Instance();
GD.Print("No Current scene set!");
}
else
{
GD.Print(" Current scene is set!");
GetTree().ReloadCurrentScene();
}
Thanks a lot for help,
Ivi