There are no error messages, console stuff, anything, I just apply the scripts to my main camera in the empty scene and nothing happens to it. please help! The code is as follows:
using UnityEngine;
using System.Collections;
public class GameOverScript : MonoBehaviour {
int score = 0;
void Start () {
score = PlayerPrefs.GetInt ("Score");
}
void OnGui()
{
GUI.Label (new Rect (Screen.width / 2 - 40, 50, 80, 30), "GAME OVER");
GUI.Label (new Rect (Screen.width / 2 - 40, 300, 80, 30), "Score: " + score);
if (GUI.Button (new Rect (Screen.width / 2 - 30, 350, 60, 30), "Retry?"))
{
Application.LoadLevel (0);
}
}
}
I just drag that onto the main camera, save the Game Over scene, fail at my own game, and all I get for my efforts is a blue default camera screen. What do I do?