In this class we looked at the very basics of programming and in a bit more detail at various components in Unity, and how they are connected.
We have used components in the previous weeks of the course, like the Transform component and others. We saw how components are in fact scripts, which we can use through the user interface of Unity. Likewise, we can make our own scripts and attach them to our objects as components. We covered the basic elements of programming and saw how they are used in Unity and the C# programming language. We discussed variables, operators, if statements, and methods, as well as some examples of how they should be written down so that Unity can understand what we mean.
In the second part of the lecture we implemented a player character controller into our scene so that we can navigate it and test the scale of our scene, and continued work on our projects.
As you get into programming, you’ll find that Google and the Unity Documentation are your best friend. Once you start thinking about the thing you want to program, you will start searching and likely find someone who has solved your issue before you. Unity itself provides detailed documentation with many example code snippets for you to copy out and use directly, or change as needed.
For more information about the topics in this lecture, check out the following links: