This is how you change scenes.
Go to File>Build Settings and drag your scenes in there. Note the numbers that are listed with each scene. To load them use `Application.LoadLevel(0);` in a script, where 0 is the number of the scene you want to load.
For instance:
using UnityEngine;
using System.Collections;
public class GameGUI : MonoBehaviour {
void OnGUI () {
// Make a background box
GUI.Box(new Rect(10,10,100,90), "This is a GUI Box");
// Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
if(GUI.Button(new Rect(20,40,80,20), "Start Game")) {
Application.LoadLevel(1);
}
}
↧