In this lecture, we'll talk about the UnityEvent and UnityAction classes in Unity. We'll start with UnityEvent, and UnityEvent is a family of classes that provide events for us. Remember, events are those things that we can add listeners to and then when the event occurs, the event calls back all those listeners by invoking the event. The UnityEvent lets us have event with different numbers of parameters or arguments, different numbers of pieces of information that the event will provide. So we have a no-argument UnityEvent that doesn't provide any information, we have a UnityEvent with one argument that provides one piece of information to each of those listeners when it calls them back and two arguments and so on. Finally, UnityEvents are generics. So if we have a UnityEvent that has one argument, we get to decide what type that argument is. Whether it's an int, or a float, or a string, or pretty much any data type that we want that event to use. Let's go take a look at the documentation for the UnityEvent classes to explore this a little further. Here's the documentation for the UnityEvent family of classes in Unity. And as you can see, we have a number of variants or forms of that class. So this first one that I have highlighted, is a no-argument version of the event. And as you can see, the description says this is a zero argument persistent callback, which really just means this is an event as we described. It can call back all the listeners that have indicated that they were interested in this particular event. I'll select the one argument form and as you can see, you have to override the class type. So what we will do in the next lecture is, we will provide a type for the single argument we're going to have. It could be an int, it could be a float. We'll see next lecture. But it could be any type you want it to be and that's why this UnityEvent family of classes is so flexible because we can have, again, over here on the left, we can have a form with one argument, or two arguments, or three arguments, or four arguments. And if you need more than four arguments, you can actually use that UnityEvent based class to build your own that has more than four arguments but I have, in my own personal experience, found that up to four is all I've ever needed. So that's a look at the UnityEvent family of classes. Now that we've looked at the UnityEvent family of classes, what is UnityAction? Well, UnityAction is also a family of classes, but these classes are delegates. They're the method signatures for the event handlers that we will use to listen for particular UnityEvents. That means that, we have a number of forms of UnityAction like a no-argument one, and a one argument one, and a two argument one and so on. And UnityActions are generics, so that we can match up a UnityAction, let's say, a one argument UnityAction that has an int for its parameter, and we could add that as a listener for a UnityEvent that has one int as its argument or parameter. So we can match UnityActions to the UnityEvents that we want those actions to listen for to handle the events as they occur. If we search on UnityAction in the Unity scripting reference, you can see we get five matches including zero argument, four argument, three argument, two argument and one argument delegates used by UnityEvents. Let's take a look at the one argument delegate. And this looks similar to the UnityEvent with one argument because it's a generic and we will provide a type when we need to use a UnityAction as a delegate to listen for a particular event. So if we were listening for an event that had a single float argument, then we would want to use UnityAction with one float as the delegate to listen for that event. And we will see that in action in the next lecture as well. To recap, we have UnityEvent and a variety of different forms for UnityEvent that gives us events in Unity games. And we have a family of classes of delegates called UnityAction that let us build event handlers for those UnityEvent.