0 votes

This is probably a dumb question.

Is there a way to determine when a scene has finished displaying? I have some code that I do not want to run until the scene is completely displayed. I've tried wiring up handlers for various signals (ready, draw, focusentered, etc) and they all seem to trigger before the scene has been displayed. Also tried calldeferred from the signal handler methods with no luck.

What am I missing?

Godot version v3.4.4.stable.official [419e713a2]
in Engine by (70 points)

1 Answer

0 votes

scene root ready() function is called last, and everything should be visually displayed at this moment. Unless your graphics equipment is too slow. If this is so You may consider yielding/waiting for fixed amount of time after ready() before running this code piece.
You know, with yield(get_tree().create_timer(1.0),"timeout")
You can hide scene behind loading screen for that time

by (5,557 points)
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 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 webmaster@godotengine.org with your username.