GDScriptFunctionState

Inherits: Reference < Object

Estado de una llamada de función después de ceder.

Descripción

Calling @GDScript.yield within a function will cause that function to yield and return its current state as an object of this type. The yielded function call can then be resumed later by calling resume on this state object.

Métodos

bool

is_valid ( bool extended_check=false ) const

Variant

resume ( Variant arg=null )

Señales

Descripciones de Métodos

  • bool is_valid ( bool extended_check=false ) const

Comprueba si se puede reanudar la llamada de función. No es así si el estado de la función ya se ha reanudado.

Si extended_check está activado, también comprueba si el script y el objeto asociados siguen existiendo. La comprobación extendida se realiza en modo de depuración como parte del resume, pero puedes utilizarlo si sabes que puedes estar intentando reanudar sin saber con seguridad que el objeto y/o el script han sobrevivido hasta ese momento.


Resume execution of the yielded function call.

If handed an argument, return the argument from the @GDScript.yield call in the yielded function call. You can pass e.g. an Array to hand multiple arguments.

This function returns what the resumed function call returns, possibly another function state if yielded again.