Chapter 2, Introducing the Building Blocks for Unity Scripts

Pop quiz – knowing C# building blocks

Q1

To store some data that will be substituted into a script somewhere.

Q2

To execute some code that will be needed several times.

Q3

By attaching the script file to a GameObject.

Q4

To have access to variables and methods on other Components.

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.