Understanding the Unity life cycle

Like all video game engines, when your game runs, Unity is executing a giant loop, repeating over and over each frame update. Unity provides many hooks to tap into events at just about every step in the game loop. Depicted below is the life cycle flowchart, taken from the Unity Manual page Execution Order of Event Functions (https://docs.unity3d.com/Manual/ExecutionOrder.html). The two event functions you are most familiar with, Start and Update, are highlighted with the red arrows. The green dots highlight a number of other events we'll reference in this conversation:

Starting at the top of this chart, when ...

Get Unity Virtual Reality Projects - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.