Loading Levels, Play,Pause and Exit in Unity 3D scene :
Example :
btn is a string.
void OnClick ()
{
if(btn=="Play")
{
Application.LoadLevel("MyScene");
}
}
Play a Game :
Time.timeScale=1;
Pause a Game :
Time.timeScale=0;
Exit from the Game :
Application.Quit();
Quit function will work on only devices.
I think this code will help you.
Thankyou.
0 Comment(s)