Execution Order of Event Functions

In Unity scripting, there are a number of event functions that get executed in a predetermined order as a script executes. This execution order is described below:

First Scene Load

These functions get called when a scene starts (once for each object in the scene).

Before the first frame update

In between frames

Update Order

When you're keeping track of game logic and interactions, animations, camera positions, etc., there are a few different events you can use. The common pattern is to perform most tasks inside the Update() function, but there are also other functions you can use.



Normal coroutine updates are run after the Update function returns. A coroutine is a function that can suspend its execution (yield) until the given YieldInstruction finishes. Different uses of Coroutines:

When the Object is Destroyed

When Quitting

These functions get called on all the active objects in your scene, :

So in conclusion, this is the execution order for any given script:


Page last updated: 2013-05-03