Unleashing the Power of C# and Visual Scripting
Unity has a lot of great built-in tools to solve the most common problems in game development, such as the ones we have seen so far. Even two games of the same genre have their own little differences that make each game unique, and Unity cannot foresee that, so that’s why we have scripting. In this chapter, we will introduce the two main Unity scripting options: C# and visual scripting. We will discuss their pros and cons and the base knowledge required to start creating gameplay with them. From now on, we will see how to achieve all our scripts using both options.
In this chapter, we will examine the following topics:
- Introducing scripting
- Creating scripts
- Using events and instructions
- Common beginner C# script errors
We are going to create our own Unity components, learning the basic structure of a script and the way that we can execute actions and expose properties to be configured...