monobehaviour
This is an old revision of the document!
Table of Contents
MonoBehaviour
Event Functions
Reset()
- This function is only called in editor mode.
- Reset is called when adding the component for the first time on a GameObject.
- Also, it is called when the user hits the Reset button in the Inspector's context menu.
- Very useful to setup values for your attributes, i.e. find a child component.
- Use it with the RequireComponent attribute to always get a reference for your component.
Awake()
- Awake will still be called for disabled components on enabled objects.
Start()
- Start is guaranteed to be called before the first FixedUpdate() or Update() for this component.
- If no FixedUpdate() or Update() events are defined, Start will be run at the end of the frame the object awoke on.
monobehaviour.1619789750.txt.gz · Last modified: 2025/01/15 04:35 (external edit)