0 votes

I have "main" function for the CanvasLayer.

So, problem is in null-instanced "onready var". All of it is null:

new_container's function:

Why .instance() isn't waiting for the full loading of scene and how to wait for it?

Godot version 3.3.3.stable
in Engine by (21 points)

1 Answer

0 votes

_ready() is not called until the node is in the scene tree after add_child is called. You need to add the node to the tree before calling the function.

by (8,528 points)

Nope, that's doesn't work.
Btw function called by signal.
I'm tried to make an instance and pass into it, but no. Instance was made in _ready() of CanvasLayer and stored in variable, but still no.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.