Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


monobehaviour

This is an old revision of the document!


MonoBehaviour

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 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.

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
monobehaviour.1621646724.txt.gz · Last modified: 2021/05/22 01:25 by 151.204.147.19