GameDev : Main Menu (Part III)!

We have to talk now about OnClickEvent
If we select Button, and look into Inspector, in the Button part there is something called On Click()
If we press the little +

It opens a little window and it ask us for and object.
What object?
The object that contain THE COMPONENT WE NEED TO CALL.

LOGIC HERE : we need to call LoadGame().
Where is it?
On Canvas right?

If we drag the Canvas into On Click Event()

No Function becomes “active”.
If we click on it, we can go inside Main Menu script and call LoadGame().

If we make a test

It works perfectly.

Now adjust Game Manager

To give it a final touch, we create a Credits Text where we write our name!

I use my name, you use yours

Customize it as you wish!

In the next articles we talk about VFX Effects!
These make your Game REALLY GOOD TO SEE IN ACTION!

Always in love with programming, even if late (I'm already 39 years old) I decided to follow my dream! We will see how far my passion will take me!