Unity Monobehavior 各种触发事件

物理:

  OnCollisonEnter  OnCollisonStary  OnCollisionExit

  与之对应的还有Trigger,Collison是有碰撞的情况下触发的,Trigger是无碰撞情况下触发的

动画:

  OnAimatorIK  OnAnimationMove

Application:

  OnApplicationFocus  Pause  Quit

GameObject:

  OnEnable  OnDisable  OnTransformChildrenChanged  OnTransfromParentChanged

鼠标:

  OnMouseDown  Enter  Exit  Over  Up  UpAsButton

网络:

  OnDisconnectedFromServer  OnFailedToConnect  OnFailedToConnectToMasterServer

  OnPlayerConnected  OnPlayerDisconnected

渲染:

  OnDrawGizmos  OnDrawGizmosSelected  OnBecameInvisible  OnBecameVisible

  OnPostRender  OnPreCull  OnPreRender  OnRederImage  OnRenderObject

  OnWillRenderObject

粒子:

  OnParticleCollision  OnParticleSystemStopped  OnParticleTrigger

参考:

https://www.cnblogs.com/Kprogram/p/5009972.html

https://docs.unity3d.com/Manual/ExecutionOrder.html

posted on 2020-03-30 20:10  胖福  阅读(795)  评论(0编辑  收藏  举报

导航