- Edited
Hi,
Apologies if this is a simple or stupid question but here i go. I have a root empty "World" scene, that i want to add child nodes to, like below;
// World.cs file
// world _ready function
Level myLevel= new Level("res://maps/map1.tmx");
Node2D levelInstance = level.Instance();
AddChild(levelInstance);
& inside Level.cs
// Level.cs
// Note: Level inherits Node2D
public override void _EnterTree()
{
GD.Print("entered tree - level");
base._EnterTree();
}
public override void _Ready()
{
GD.Print("level ready");
}
I can see on screen and in the debugging remote that my scene is added to the tree and everything is fine. However, inside my level class for my tiled map the enter_tree and _ready functions are never called? Why is that?