Chapter 6. Using Dot Syntax for Object Communication
Scripts do many things by accessing the features built into Unity and third-party plugins. The Unity Scripting Reference is our link to the built-in Unity features. The thing is, exactly how do we invoke all of those Unity features?
So far all we've covered is basic C# programming. Granted, the example code we've seen has included some Dot Syntax, such as Debug.Log() to send output to Unity's Console. This is one of those Unity features. In the last chapter, we even saw some more Dot Syntax, pony.Key and pony.Value, which has nothing to do with Unity. These are just C# OOP (Object Oriented Programming) related features.
In both cases, there's some type of communication taking place to access methods and data to make things happen. To the beginner, those dots maybe odd looking and confusing, and they may ask, "What's the deal with all those darn dots between words?" Well, if you've...