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 ...
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.