the node is a child of root node, and it has a child Timer node, script attached to the node is like
onready var timer = get_node("Timer")
func _ready():
print(timer)
func _process(delta):
print(timer)
But there is more code in the scene. So when I run the scene, it print [Timer:1017]
, should be from the _ready
function, and all it print then is [Deleted Object]
, the code is why the timer got deleted?
I create a separate scene and only contain these code and it work, but no idea why this happened.