Summary

There are unlimited ways to make decisions in code, however, we covered many of the common ways. The if statement is how the majority of decisions are made, including the if-else statements. Then we covered some of the sources that require making decisions, like user input, and using loops to evaluate data stored in arrays, lists and dictionaries. None of this is complicated. It's just a process of simple, logical steps.

Now that we've learned about the fundamentals of programming for writing scripts, it's time to dig into the world of objects. Since everything in Unity is an object, you need to know how to access the Components of an object, and how to communication between objects, by using dot syntax. You have seen some dot syntax used ...

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.