Chapter 9, Start Building a Game and Get the Basic Structure Running

Pop quiz – understanding GameObjects

Q1

The Reference Manual and the Scripting Reference.

Q2

They are destroyed.

Q3

Each State would need to call the GetComponent() method which takes time. Since States already have access to StateManager, StateManager can call GetComponent() once and store a reference to GameData.

Q4

The GameManager GameObject does not get destroyed when the Scene changes. Any GameObject that is a child of GameManager also won't be destroyed.

Get Learning C# by Developing Games with Unity 3D Beginner's Guide 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.