Help with a Start Button


I’m having a little trouble making a button to start the level (not a main menu button)

Inside the level there is a button to start the level

I want to start the level paused and ask for the user to click/touch the button to start playing

I followed some tutorials on how to make a pause/unpause button, but it seems I can’t make it work the way I want

My question: how can I do that?


Do you set it Pause with Time.timeScale ?

void Start(){

	void Pause(){
		Time.timeScale = 0;

	public void UnPause(){
		Time.timeScale = 1;

assign UnPause to a Button

For a start button, create a button and call it start or whatever you wanted to call it.

Then create the following javascript and call it play:

#pragma strict
 function LoadScene ()
     Application.LoadLevel("scene name");

add it to your button.

you will see a function list on the button, which will be empty.

add a function using the + sign.

set it to Runtime Only

use the dropdown box to select the script (play), and tick LoadScene.

For the script to work, you must ensure that the scene you want to load is located in your build settings…

I really hope this helped :smiley: