A matter of great import
That's a big list of variables! It all starts with an import
statement. If you read through the code addendum at the end of Chapter 4, Code Comfort, you'll remember that C# code requires using declarations that tell Unity we'd like to certain chunks of the code base. The JavaScript keyword import
is identical to the C# keyword using
. We use it to tell Unity that we're accessing System.Collections.Generic
chunk of code, which isn't normally available to us by default. Try typing List<>
into your code without the using
declaration. Then, add the using
declaration and type List<>
again. When we declare that we're using System.Colletions.Generic
, we get access to a whole new bunch of stuff.
Why do we need access anyway? Because the generic List
object we declare a little farther down requires it. But what the heck is a List? It's one in a family of datatypes called Collections, which includes its (perhaps) more well-known cousin, array.
If a variable is a bucket...