Using events and instructions
Now that we have a script, we are ready to do something with it. We won't implement anything useful in this chapter, but we will settle the concepts to add some types of behavior for the scripts we are going to create in the next chapters.
In this section, we are going to cover the following concepts:
- Events and instructions
- Using fields in instructions
- Common beginner errors
We are going to explore the Unity event system, which will allow us to respond to these situations by executing Unity functions. These functions will also be affected by the value of the editor, and fields exposed to our script will be configurable. Finally, we are going to discuss common scripting errors and how to solve them. Let's start by introducing the concept of Unity events.
Events and instructions
Unity allows us to create behavior in a cause-effect fashion, which is usually called an event system. An event is a situation that Unity...