Family values

The explanation for why we used 9,9 as the initial x / y values for the Square is a little bit twisty, but here goes:

If we hadn't first set that initial x and y values of Square to 9,9 (say, for example, if the initial values of Square were 0,0), then any Square that had an x value of 0 or a y value of 0 would not be overridden. You wouldn't have seen the value turn bold in the Inspector panel. Non-overridden values are not "protected"—they're at risk of being modified whenever a change from another instance is applied to the Prefab.

Imagine yourself making the above changes to the bottom-right Square, which has its x and y values set to 2,2. Once you click on Apply, x:2 y:2 become the default values for all squares whose values were ...

Get Unity 4.x Game Development by Example 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.