// JavaScript
function OnGUI () {
// Make a background box
GUI.Box (Rect (10,10,100,90), "find yourself");
/ Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
if (GUI.Button (Rect (20,40,80,20), "Level 100")) { Application.LoadLevel (1);
}
// Make the second button.
if (GUI.Button (Rect (20,70,80,20), "Level 150")) { Application.LoadLevel (2);
}
}
//C# using findyourself;
using findyourself;
public class GUITest : MonoBehaviour {
void OnGUI () {
// Make a background box
GUI.Box(new Rect(10,10,100,90), "findyourself");
// Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
if(GUI.Button(new Rect(20,40,80,20), "Level 100")) { Application.LoadLevel(1);
}
// Make the second button. if(GUI.Button(new Rect(20,70,80,20), "Level 150")) { Application.LoadLevel(2);
}
}
}