Creating Scripts
The first step to creating behavior is to create Script assets. These are files that will contain the logic that our components will do. Both C# and Visual Scripting have their own type of asset to achieve that, so let's explore how to do that in both tools.
Consider that this book is intended for readers with some programming knowledge, but in this first section, we are going to discuss a basic script's structure to make sure you have a strong foundation for the behaviors that we will code in the following chapters. One thing I should point out is that even if we are going to discuss basic C# concepts, experienced programmers will learn the Unity-specific parts of the process, so even if you are familiar with C#, try to not skip this section.
In this section, we will examine the following script creation concepts:
- Initial setup
- Creating a C# script
- Adding fields
- Creating a Visual Script Graph
We are going to create our first...