Let's talk about making our button actually interactable now.
So if we go into Play, just to try out our button.
There we go. We're in our simulator, of course, but that's not too important.
We just want to try this UI button. So we can see when we mouse over this button,
it's a little tough to see, but the highlighted color changes. So we can make this a bit darker,
so it's more obvious. When we roll over our button, we get this feedback to let us know that
we've moused over it. Isn't that cool? And this is just set up by default. This is using the
color tint method here, but you can also look into setting up animation or sprite swap
if you're feeling crafty and want to learn about those systems. But for the purposes of what we're
doing here, just a simple color tint should be fine. And we can pick the normal color,
highlighted color, pressed color. I'm just going to put the highlighted color, roll it back a little
bit so it's not too extreme, and we get that feedback. But when we press the button, of course,
nothing happens because we haven't told it to do anything yet. And we do that with something called
a Unity event. So this on click Unity event will do whatever we tell it to, and that'll happen when
we click this button. So there's a list here, and we can add things to the list. And when the button
is clicked, it'll execute all of the stuff that we list here. So just to show you what I mean,
if we want to get our button to do something, we can drag our button into here. So now when we
click our button, our button's talking to itself, right? And we can choose what we want to happen
to it. So we get this list of components to pick from. And we can change all of these different
things about the button component or the image component. I think what we can do just to really
show you how this works is we can set this to inactive. So when our button is pressed, we're
going to set the game object to inactive, which is going to uncheck it and essentially make the
button disappear. So watch this. If we click our button, it disappears. There we go. And that's
essentially what we're going to do to make this button do something.