This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
monobehaviour [2021/04/08 23:44] 73.95.178.156 |
monobehaviour [2021/05/22 01:22] 151.204.147.19 added note about the visibility events not being called for object in CanvasRenderers |
||
---|---|---|---|
Line 2: | Line 2: | ||
===== Event Functions ===== | ===== Event Functions ===== | ||
+ | |||
+ | ==== Reset() ==== | ||
+ | * Reset is only called in editor mode. | ||
+ | * 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() ==== | ||
Line 10: | Line 15: | ||
* If no FixedUpdate() or Update() events are defined, Start will be run at the end of the frame the object awoke on. | * If no FixedUpdate() or Update() events are defined, Start will be run at the end of the frame the object awoke on. | ||
+ | ==== OnBecameVisible() ==== | ||
+ | * does not get called if the game object is rendered by a ugui CanvasRenderer | ||
+ | |||
+ | ==== OnBecameInvisible() ==== | ||
+ | * does not get called if the game object is rendered by a ugui CanvasRenderer |