LateUpdate is called every frame, if the Component is enabled.
This is a lifecycle method. It may not be implemented in the super class.
You can only call its super class method inside it. It should not be called manually elsewhere.
the delta time in seconds it took to complete the last frame
Called when this component will be destroyed.
This is a lifecycle method. It may not be implemented in the super class.
You can only call its super class method inside it. It should not be called manually elsewhere.
Called when this component becomes disabled or its node becomes inactive.
This is a lifecycle method. It may not be implemented in the super class.
You can only call its super class method inside it. It should not be called manually elsewhere.
Called when this component becomes enabled and its node is active.
This is a lifecycle method. It may not be implemented in the super class.
You can only call its super class method inside it. It should not be called manually elsewhere.
When attaching to an active node or its node first activated.
onLoad is always called before any start functions, this allows you to order initialization of scripts.
This is a lifecycle method. It may not be implemented in the super class.
You can only call its super class method inside it. It should not be called manually elsewhere.
onRestore is called after the user clicks the Reset item in the Inspector's context menu or performs
an undo operation on this component.
If the component contains the "internal state", short for "temporary member variables which not included
in its CCClass properties", then you may need to implement this function.
The editor will call the getset accessors of your component to record/restore the component's state
for undo/redo operation. However, in extreme cases, it may not works well. Then you should implement
this function to manually synchronize your component's "internal states" with its public properties.
Once you implement this function, all the getset accessors of your component will not be called when
the user performs an undo/redo operation. Which means that only the properties with default value
will be recorded or restored by editor.
Similarly, the editor may failed to reset your component correctly in extreme cases. Then if you need
to support the reset menu, you should manually synchronize your component's "internal states" with its
properties in this function. Once you implement this function, all the getset accessors of your component
will not be called during reset operation. Which means that only the properties with default value
will be reset by editor.
This function is only called in editor mode.
Called to initialize the component or node’s properties when adding the component the first time or when the Reset command is used.
This function is only called in editor.
Called before all scripts' update if the Component is enabled the first time.
Usually used to initialize some logic which need to be called after all components' onload
methods called.
This is a lifecycle method. It may not be implemented in the super class.
You can only call its super class method inside it. It should not be called manually elsewhere.
Update is called every frame, if the Component is enabled.
This is a lifecycle method. It may not be implemented in the super class.
You can only call its super class method inside it. It should not be called manually elsewhere.
the delta time in seconds it took to complete the last frame
Generated using TypeDoc
__preload
is called before every onLoad.It is used to initialize the builtin components internally,
to avoid checking whether onLoad is called before every public method calls.
This method should be removed if script priority is supported.