The OnClick event does not appear!

0

You see, create a script in Unity to get out of the game, but, I had to add it to the OnClick event and when I looked for it I did not find it, does anyone know if something should be activated or add a script? Could you leave it here? I leave you an image just in case, I hope it was clear, thanks: /

PS: I'm using Unity 2018.2.13f1 in 2D mode

    
asked by DSRaptor DEV 26.10.2018 в 22:00
source

2 answers

0

DSRaptor, in addition to the answer of cmanzo there is something missing:

To add functions to your buttons, you must drag a object that contains the script. Therefore, you must drag to onClick() of your button an object that has your script with the function you want to use.

    
answered by 29.10.2018 / 10:03
source
0

I think you mean add it to a button ... create a button (inside canvas), inside the button will be the OnClick event, that's where you should add it.

    
answered by 26.10.2018 в 22:10