MonoBehaviour组件的生命周期

Editor:
Reset;

Initialization:
Awake
OnEnable
Start

Physic:
FixedUpdate
OnTriggerXXX
OnCollisionXXX

Input events:
OnMouseXXX

Game logic:
OnUpdate
LateUpdate

Scene rendering:
OnWillrenderObject
OnPrecull
OnBecameVisible
OnBecameInVisible
OnRenderObject
OnPostRender
OnRenderImage

Gizmo rendering:
OnDrawGizmos

GUI rendering:
OnGUI

Pausing:
OnApplicationPause

Disable:
OnDisable

Decommission:
OnDestory
OnApplicationQuit

你可能感兴趣的:(Unity3D)