Unity Developers Question: Download Unity 3D Developer PDF

Arrange the event functions listed below in the order in which they will be invoked when an application is closed:

Update()
OnGUI()
Awake()
OnDisable()
Start()
LateUpdate()
OnEnable()
OnApplicationQuit()
OnDestroy()

Tweet Share WhatsApp

Answer:

The correct execution order of these event functions when an application closes is as follows:

Awake()
OnEnable()
Start()
Update()
LateUpdate()
OnGUI()
OnApplicationQuit()
OnDisable()
OnDestroy()
Note: You might be tempted to disagree with the placement of OnApplicationQuit() in the above list, but it is correct which can be verified by logging the order in which call occurs when your application closes.

Download Unity 3D Developer PDF Read All 27 Unity 3D Developer Questions
Previous QuestionNext Question
Okay, we're going to work through a problem here?Which of the following examples will run faster?

1000 GameObjects, each with a MonoBehaviour implementing the Update callback.
One GameObject with one MonoBehaviour with an Array of 1000 classes, each implementing a custom Update() callback?