godot
godot copied to clipboard
In 4.3 dev 6, GetTree().Root...missing Node.
public void StartGameAsMainMenu()
{
GameState = Enum_GameState.Main_Menuing;
if (MainMenu != null && MainMenu.IsInsideTree())
{
GetTree().Root.CallDeferred("remove_child", MainMenu);
MainMenu = null;
}
MainMenu = _MainMenu.Instantiate();
GetTree().Root.CallDeferred("add_child", MainMenu);
}
GetTree().Root.CallDeferred("add_child", MainMenu);
===> MainMenu is null
System information
GetTree().Root.CallDeferred("add_child", MainMenu); ===> MainMenu is null
Issue description
GetTree().Root.CallDeferred("add_child", MainMenu);
===> MainMenu is null
Steps to reproduce
GetTree().Root.CallDeferred("add_child", MainMenu);
===> MainMenu is null
Minimal reproduction project (MRP)
GetTree().Root.CallDeferred("add_child", MainMenu);
===> MainMenu is null
Please fill in all the sections properly, or ask in the forums if you are looking for support, this is for reporting bugs
Closing due to lack of response, if you provide the requested information this can be reopened