MonoBehaviour is the base class every script derives from.
Using Javascript every script automatically derives from MonoBehaviour. When using C# or Boo you have to explicitly derive from MonoBehaviour.
|
Update
|
Update is called every frame, if the MonoBehaviour is enabled.
|
|
LateUpdate
|
LateUpdate is called every frame, if the Behaviour is enabled.
|
|
FixedUpdate
|
This function is called every fixed framerate frame, if the MonoBehaviour is enabled.
|
|
Awake
|
Awake is called when the script instance is being loaded.
|
|
Start
|
Start is called just before any of the Update methods is called the first time.
|
|
Reset
|
Reset to default values.
|
|
OnMouseEnter
|
OnMouseEnter is called when the mouse entered the GUIElement or Collider.
|
|
OnMouseOver
|
OnMouseOver is called every frame while the mouse is over the GUIElement or Collider.
|
|
OnMouseExit
|
OnMouseExit is called when the mouse is not any longer over the GUIElement or Collider.
|
|
OnMouseDown
|
OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collider.
|
|
OnMouseUp
|
OnMouseUp is called when the user has released the mouse button.
|
|
OnMouseDrag
|
OnMouseDrag is called when the user has clicked on a GUIElement or Collider and is still holding down the mouse.
|
|
OnTriggerEnter
|
OnTriggerEnter is called when the Collider other enters the trigger.
|
|
OnTriggerExit
|
OnTriggerExit is called when the Collider other has stopped touching the trigger.
|
|
OnTriggerStay
|
OnTriggerStay is called once per frame for every Collider other that is touching the trigger.
|
|
OnCollisionEnter
|
OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider.
|
|
OnCollisionExit
|
OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider.
|
|
OnCollisionStay
|
OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider.
|
|
OnControllerColliderHit
|
OnControllerColliderHit is called when the controller hits a collider while performing a Move.
|
|
OnJointBreak
|
Called when a joint attached to the same game object broke.
|
|
OnParticleCollision
|
OnParticleCollision is called when a particle hits a collider.
|
|
OnBecameVisible
|
OnBecameVisible is called when the renderer became visible by any camera.
|
|
OnBecameInvisible
|
OnBecameInvisible is called when the renderer is no longer visible by any camera.
|
|
OnLevelWasLoaded
|
This function is called after a new level was loaded.
|
|
OnEnable
|
This function is called when the object becomes enabled and active.
|
|
OnDisable
|
This function is called when the behaviour becomes disabled () or inactive.
|
|
OnDestroy
|
This function is called when the MonoBehaviour will be destroyed.
|
|
OnPreCull
|
OnPreCull is called before a camera culls the scene.
|
|
OnPreRender
|
OnPreRender is called before a camera starts rendering the scene.
|
|
OnPostRender
|
OnPostRender is called after a camera finished rendering the scene.
|
|
OnRenderObject
|
OnRenderObject is called after camera has rendered the scene.
|
|
OnWillRenderObject
|
OnWillRenderObject is called once for each camera if the object is visible.
|
|
OnGUI
|
OnGUI is called for rendering and handling GUI events.
|
|
OnRenderImage
|
OnRenderImage is called after all rendering is complete to render image
|
|
OnDrawGizmosSelected
|
Implement this OnDrawGizmosSelected if you want to draw gizmos only if the object is selected.
|
|
OnDrawGizmos
|
Implement this OnDrawGizmos if you want to draw gizmos that are also pickable and always drawn.
|
|
OnApplicationPause
|
Sent to all game objects when the player pauses.
|
|
OnApplicationFocus
|
Sent to all game objects when the player gets or looses focus.
|
|
OnApplicationQuit
|
Sent to all game objects before the application is quit.
|
|
OnPlayerConnected
|
Called on the server whenever a new player has successfully connected.
|
|
OnServerInitialized
|
Called on the server whenever a Network.InitializeServer was invoked and has completed.
|
|
OnConnectedToServer
|
Called on the client when you have successfully connected to a server
|
|
OnPlayerDisconnected
|
Called on the server whenever a player disconnected from the server.
|
|
OnDisconnectedFromServer
|
Called on the client when the connection was lost or you disconnected from the server.
|
|
OnFailedToConnect
|
Called on the client when a connection attempt fails for some reason.
|
|
OnFailedToConnectToMasterServer
|
Called on clients or servers when there is a problem connecting to the MasterServer.
|
|
OnMasterServerEvent
|
Called on clients or servers when reporting events from the MasterServer.
|
|
OnNetworkInstantiate
|
Called on objects which have been network instantiated with Network.Instantiate
|
|
OnSerializeNetworkView
|
Used to customize synchronization of variables in a script watched by a network view.
|