Home > other >  UnityAPI script life cycle
UnityAPI script life cycle

Time:09-17

AwakeO started calling, do some initialization, suggest to use less, objects may not be instantiated at the moment, will affect the program execution order, StartO initialization is not very urgent, generally in the Start to do, just call before the Update function is invoked for the first time, UpdateO call each frame, frame interval could change,

FixedUpdate0 call at the same time interval, in the effect of mechanical Update, before performing the Update,

LateUpdateO call, after the Update and FixedUpdate call -- a move in the Update of the characters, and the camera follow changes in LateUpdate, ensure that two independent - the former, not an error,
Called when the OnDestory0 object is deleted,
Are called OnEnableO objects when enabled,
Be disabled when the OnDisable0 object,

CodePudding user response:

Life cycle? Directly see
  • Related