Advertisement
Guest User

Title Screen

a guest
Jul 22nd, 2014
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1.  
  2. private var bWidth = Screen.width/4;
  3. private var bHeight = bWidth/2;
  4.  
  5.  
  6.  
  7. function Start () {
  8.    
  9.  
  10. }
  11.  
  12. function Update () {
  13.    
  14.  
  15. }
  16.  
  17. function OnGUI () {
  18.         if (GUI.Button (Rect (Screen.width/2 -b Width/2, Screen.height/2 - bHeight, bWidth, bHeight), "Play")){
  19.             Application.LoadLevel("YOUR GAME SCENE NAME HERE");
  20.  
  21.         }
  22.  
  23.         if (GUI.Button (Rect (Screen.width/2 -b Width/2, Screen.height/2 + bHeight, bWidth, bHeight), "Quit")){
  24.             Application.Quit();
  25.         }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement