I have 2 Canvas UIs (Start and Exit)
on the home screen of my game. I want to add 1 script that does the following:
When the UI Image Play
is clicked
public void NextLevel(int level)
{
Score.Inicializar();
Application.LoadLevel (1);
}
When the UI Image Exit
is clicked
Application.Quit ()
;
C# if possible.
Add this script to your Play image:
And add this script to your Exit image:
And finally make sure no other ui blocking/overlapping your images, otherwise they won't receive any click event.
Not to mention that a script file's name should match the name of it class :)