I have a node
Road which has some
The main scene
Road as a child.
$Road.advance() method in
_ready. As a result I have an error
Attempt to call function 'advance in base 'null instance' on a null instance..
It, as I think, means that
Road is not "ready" or it is an engine bug (0_o).
Game._ready method and had
I always thought that method
_ready in the parent is called only after all children called their
_ready. This is really surprising for me.
Have anyone stucked with a problem like this one? It might be something common.
I tried to put
print("Road is ready") to
Road._ready and it wasn't ever printed.
I cannot add images now, sorry, but the hierarchy is really simple -- just a child node in parent, and it is never "ready" ;(
$Road.advance() # ERROR: Road is nil
print(”Road is ready") # Never printed
# Some logic
I'm absolutely sure, that, at least in the editor, the Road is a child of the Game. But, maybe, something out of user view is wrong, maybe inside .tscn files. Anyway, I've tried recreating Road and Game scenes from scratch -- does not help. Now have no idea why this may happen.