Chapter 6, Using Dot Syntax for Object Communication
Pop quiz – understanding communication between objects
Q1 |
It's an address for locating public variables and methods. |
Q2 |
A reference to the object. The object itself is not stored in the variable. A reference points to the actual object so that the variables and methods of the object can be accessed. |
Q3 |
Dot Syntax allows access to any GameObject or any of its Components, however, the variables and methods on other Components must be public. |
Q4 |
A member variable of a Component can appear in the Inspector by making the variable public, and then a GameObject can be dragged-and-dropped into the Property (variable) in the Inspector panel. |
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.