I am using unity 4.6.3. I am new to unity so I watched several video tutorials on youtube all the step i did that was in tutorial. I tried everything but I can’t find solution of my problem.
In my project I created a scene “MainMenu” In this scene there are two buttons named “Start Game” & “Exit Game”.
There is an empty game object also with position (0,0,0) and add a script “mainMenuButtons” to it.
Here is my script “mainMenuButtons”
public class mainMenuButtons : MonoBehaviour {
void StartGame(){
Application.LoadLevel (1);
}
void ExitGame(){
Application.Quit ();
}
}
Now I want to assign on click event on “Start Game” buttons to this StartGame() function.
So I followed the steps click on StartButton.
Click on “+” sign below the On Click().
When I click “+” sign I show 3 items here is a screen shot
I draged an empty game object i.e. UIManager.
click on No Function and select a script “mainMenuButtons” but there is no StartGame() function or ExitGame() function.
Here is a screenshot
All the tutorial show the StartGame function but in my case it is not
am i making any mistake?
plz help me
sorry for my english &
Thanks in Advance