Unity 3D - Error BCE0019 , " 'paused' is not a member of PauseScript"
- by user3666251
I am trying to make a game for Android in Unity. Came to the part where I have to make a pause menu option. Made a GUITexture and placed it on the top right side of the screen then I attached this script to it :
#pragma strict
function OnMouseDown(){
this.paused = !this.paused;
}
function OnGUI(){
if(this.paused){
if (GUI.Button(Rect(10,10,100,50),"Restart")){
Application.LoadLevel(Application.loadedLevel);
}
// Insert the rest of the pause menu logic
}
}
It gives me this error :
"Assets/Scripts/PauseScript.js(4,10): BCE0019: 'paused' is not a
member of 'PauseScript'. "
"PauseScript" is the name of my pause script.
Thank you.