godot icon indicating copy to clipboard operation
godot copied to clipboard

In 4.3 dev 6, GetTree().Root...missing Node.

Open teamjistory opened this issue 1 year ago • 1 comments

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

teamjistory avatar May 05 '24 13:05 teamjistory

Please fill in all the sections properly, or ask in the forums if you are looking for support, this is for reporting bugs

AThousandShips avatar May 05 '24 13:05 AThousandShips

Closing due to lack of response, if you provide the requested information this can be reopened

AThousandShips avatar Jun 06 '24 15:06 AThousandShips