Complete Unity C# Reference — MonoBehaviour
Methods & Common Engine APIs
Organized by category. Each entry is the function/property name followed by a one-line description.
Lifecycle (MonoBehaviour)
Awake() — Called when the script instance is being loaded.
OnEnable() — Called when the object becomes enabled and active.
Reset() — Called to reset the script's serialized properties to defaults.
Start() — Called before the first frame update once the script is enabled.
FixedUpdate() — Called on a fixed timestep for physics-related updates.
Update() — Called once per frame for frame-dependent logic.
LateUpdate() — Called once per frame after all Update calls.
OnDisable() — Called when the behaviour becomes disabled or inactive.
OnDestroy() — Called when the MonoBehaviour will be destroyed.
OnApplicationQuit() — Called before the application quits.
OnApplicationPause(bool pause) — Called when the application is paused or resumed.
OnApplicationFocus(bool focus) — Called when the application gains or loses focus.
Coroutines & Invocation
StartCoroutine(IEnumerator) — Starts a coroutine to run across frames.
StopCoroutine(IEnumerator or string) — Stops a running coroutine.
StopAllCoroutines() — Stops all coroutines started on this MonoBehaviour.
Invoke(string methodName, float time) — Invokes a method after a time delay.
InvokeRepeating(string methodName, float time, float repeatRate) — Invokes a method repeatedly on
a schedule.
CancelInvoke() — Cancels all invoked methods on this MonoBehaviour.
IsInvoking(string) — Checks if a specific Invoke is scheduled.
GameObject & Component
gameObject — Reference to the GameObject the script is attached to.
transform — Reference to the GameObject's Transform component.
tag — The GameObject's tag string.
SetActive(bool) — Enables or disables the GameObject in the scene.
GetComponent() — Returns the component of type T attached to the GameObject.
GetComponents() — Returns all components of type T attached to the GameObject.
GetComponentInChildren() — Returns component of type T in children.
GetComponentInParent() — Returns component of type T in parent GameObjects.
AddComponent() — Adds a component of type T to the GameObject.
TryGetComponent(out T) — Tries to get the component and returns whether it succeeded.
CompareTag(string) — Checks if the GameObject has the specified tag.
SendMessage(string methodName) — Calls a method on this GameObject's components.
BroadcastMessage(string methodName) — Sends a message to this GameObject and all its children.
Find(string name) — Finds a GameObject by name in the scene ([Link]).
FindWithTag(string tag) — Finds a GameObject by tag.
FindGameObjectsWithTag(string tag) — Finds all active GameObjects with the given tag.
Instantiate(Object) — Creates a copy of a Unity Object (prefab, GameObject, etc.).
Destroy(Object, float t=0) — Destroys a Unity Object optionally after a delay.
DontDestroyOnLoad(Object) — Prevents an object from being destroyed when loading a new scene.
Transform & Math
[Link] — World position of the Transform.
[Link] — Local position relative to parent.
[Link] — World rotation as a Quaternion.
[Link] — Local rotation relative to parent.
[Link] — Local scaling of the Transform.
[Link](Vector3) — Moves the Transform by a translation vector.
[Link](Vector3 or axis, angle) — Rotates the Transform by given angles.
[Link](Transform or Vector3) — Rotates the Transform to face a target.
[Link](Transform parent) — Sets the parent Transform.
[Link]() — Removes all child Transforms from the parent.
[Link](a, b, t) — Linearly interpolates between two vectors.
[Link](current, target, maxDistanceDelta) — Moves a point toward target by
maxDistanceDelta.
[Link](x,y,z) — Creates a Quaternion from Euler angles.
[Link](a, b, t) — Interpolates between two rotations.
[Link]() — Absolute value.
[Link](value, min, max) — Clamps a value between min and max.
[Link](a, b, t) — Linearly interpolates between two floats.
[Link](a, b, t) — Interpolates between angles, correctly handling wrap-around.
[Link](a, b, maxDelta) — Moves a float value towards target by maxDelta.
[Link]() — Gradually changes a value towards a desired goal over time.
Physics & Collisions
OnCollisionEnter(Collision) — Called when this collider/rigidbody begins touching another
rigidbody/collider.
OnCollisionStay(Collision) — Called once per frame while colliders/rigidbodies are touching.
OnCollisionExit(Collision) — Called when colliders/rigidbodies stop touching.
OnTriggerEnter(Collider) — Called when another collider enters a trigger collider.
OnTriggerStay(Collider) — Called once per frame while another collider is within the trigger.
OnTriggerExit(Collider) — Called when another collider leaves the trigger.
[Link](Ray, out RaycastHit, float) — Casts a ray and returns true if it hits something.
[Link]() — Casts a ray and returns all hits.
[Link]() — Casts a sphere along a ray and returns information on the first hit.
[Link](Vector3, float) — Returns colliders overlapping a sphere volume.
[Link]() — Returns colliders overlapping a box volume.
[Link]() — Checks if any colliders fall within a sphere.
[Link](Vector3) — Adds a force to a Rigidbody for physics-based movement.
[Link](Vector3) — Applies rotational force to a Rigidbody.
[Link](Vector3) — Moves a Rigidbody while respecting interpolation and collisions.
[Link](Quaternion) — Rotates a Rigidbody during physics updates.
[Link] — Gets or sets Rigidbody linear velocity.
[Link] — Gets or sets Rigidbody angular velocity.
[Link] — Enables or disables the Collider component.
[Link] — If true, the Collider acts as a trigger and doesn't perform physical collisions.
Input & Controls
[Link](KeyCode) — Returns true while the specified key is held down.
[Link](KeyCode) — Returns true during the frame the user starts pressing down the key.
[Link](KeyCode) — Returns true during the frame the user releases the key.
[Link](string) — Returns true while a virtual button is held.
[Link](string) — Returns true the frame the virtual button was pressed.
[Link](string) — Returns true the frame the virtual button was released.
[Link](string) — Returns the value of a virtual axis (e.g., "Horizontal").
[Link] — Current mouse position in screen pixels.
[Link](int) — Returns true while the given mouse button is held.
[Link](int) — Returns true during the frame the mouse button is pressed.
[Link](int) — Returns true during the frame the mouse button is released.
[Link] — Number of touches currently on screen.
[Link](int) — Returns Touch structure for the given finger index.
[Link]() — Returns connected joystick names.
UI (uGUI) & Events
Canvas — Component that all UI elements render under.
RectTransform — Transform type tailored for UI layout and anchoring.
[Link](Action) — Register a callback for button clicks.
[Link](Action) — Register callback for slider value changes.
[Link] — Boolean property for toggle state.
Text / [Link] — String displayed by text UI elements.
[Link] — Sprite displayed by UI Image component.
EventSystem — Manages UI events and input modules.
[Link](PointerEventData) — Interface method for click events on UI
elements.
[Link](PointerEventData) — Interface method called while dragging UI elements.
[Link](PointerEventData) — Interface method called when pointer
enters element.
[Link](PointerEventData) — Interface method called when pointer exits
element.
[Link] — Controls transparency of a group of UI elements.
[Link]() — Forces the canvas to update immediately.
Animation & Animator
[Link](string stateName) — Plays the specified animation state.
[Link](string) — Sets a trigger parameter to transition animations.
[Link](string) — Resets a trigger parameter.
[Link](string, bool) — Sets a boolean parameter in the Animator.
[Link](string, float) — Sets a float parameter in the Animator.
[Link](int layerIndex) — Returns current state information for the
specified layer.
OnAnimatorIK(int layerIndex) — Called by the Animator for Inverse Kinematics setup.
OnAnimatorMove() — Called after root motion is applied to allow script-driven adjustments.
[Link]() — Legacy animation API: plays the default animation.
Audio
[Link]() — Plays the audio clip attached to the AudioSource.
[Link](AudioClip) — Plays an audio clip once without interrupting the main clip.
[Link]() — Stops playback of the AudioSource.
[Link]() — Pauses playback.
[Link] — Volume level for the AudioSource.
[Link] — Master volume scale for the audio system.
[Link] — If true, the clip will loop when finished.
[Link] — Pitch multiplier for playback speed and pitch.
Rendering & Graphics
[Link] — Convenience reference to the camera in the scene tagged 'MainCamera'.
[Link]() — Converts a point from screen space into world space.
[Link]() — Converts a point from world space into screen space.
[Link] — Vertical field of view for perspective cameras.
[Link] — Whether the camera is orthographic.
[Link]() — Copies pixels from one render texture to another, optionally with a shader/material.
RenderTexture — Texture that can be rendered into by a Camera or Graphics calls.
[Link](string) — Finds a shader by name.
[Link]/SetColor/SetTexture() — Sets properties on a material used by a renderer.
[Link] — Toggles whether the Renderer draws geometry.
[Link] — Access to the material instance used for rendering.
Scene Management
[Link](string or int) — Loads a scene by name or index (single mode by default).
[Link]() — Asynchronously loads a scene.
[Link]() — Unloads a scene asynchronously.
[Link]() — Returns the currently active scene.
[Link] — Number of scenes currently loaded.
[Link](int index) — Returns the Scene at the given index.
[Link] — Event fired when a scene has finished loading.
Time & Performance
[Link] — Time in seconds since last frame (useful for frame-rate independent movement).
[Link] — Time step for FixedUpdate calls.
[Link] — Time in seconds since the start of the game.
[Link] — Scale at which time passes (0 pauses the game).
[Link] — Delta time unaffected by timeScale.
[Link] — Desired frame rate for the application.
[Link](int) — Sets the current quality level.
Serialization & Editor Utilities
[SerializeField] — Attribute to serialize private fields in the Inspector.
[HideInInspector] — Hides a public field in the Inspector.
[ExecuteInEditMode] — Allow script to run in edit mode.
[Link] — Editor-only: checks if play mode is active.
[Link]() — Logs a message to the Console.
[Link]() — Logs a warning message.
[Link]() — Logs an error message.
[Link]() — Draws a line in the Scene view for debugging.
OnDrawGizmos() — Draw gizmos for visual debugging in the editor.
OnDrawGizmosSelected() — Draw gizmos when the object is selected in the editor.
Networking & Multiplayer (High Level) - Common Methods
NetworkBehaviour (UNet deprecated) — Base class for networked behaviors in older HLAPI.
[Link]() — Photon: instantiate a networked object across clients.
[Link]() — Starts a host for networking (varies by framework).
Common Utility APIs
[Link]/GetInt/SetString/GetString — Simple local persistent storage for small values.
[Link]/FromJson — Serialize and deserialize objects to/from JSON.
[Link] — Standard .NET file IO for reading/writing files.
[Link] — Directory path for saving player data on the device.
[Link] / [Link] — Current screen resolution in pixels.
[Link] — Toggles full-screen mode.
Notes:
This reference covers built-in MonoBehaviour lifecycle methods and many commonly used Unity engine
APIs across systems (physics, UI, input, animation, audio, rendering, scenes, etc.).
For API specifics, parameter overloads, and the most current additions, consult the official Unity Scripting
API documentation.
Some APIs differ between Unity versions; check version-specific docs if you encounter missing methods.