0 votes

quisiera saber que es onready var ya que la uso y no se lo que es y quisiera aprender ya que quiero ver si la aplico en mas cosa y no solo para no dejar salir al jugador de la pantalla

Godot version estable
in Engine by (14 points)

1 Answer

0 votes

Keyword

Onready is a keyword that basically states set the variable when it is ready
This is most useful with node's and scenes as you may want to access or set properties that won't be available until it is ready (which happens when the node is properly added to the scene tree)

Additional info

The onready var is the same as setting the var in the _ready() function of the requested node / scene
The variable is assigned before the _ready() func of the calling script but wont be set until its available so in cases where an error occurs its possible for the var to return null

by (6,934 points)

muchas gracias

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.