Hello,
i have a problem with my menu script. When i put my mouse on the guitexture, it changes on a other texture but it doesn’t work
there is my script:
var levelToLoad : String;
var normalTexture : Texture2D;
var rollOverTexture: Texture2D;
var beep : AudioClip;
var QuitButton : boolean = false;
function OnMouseEnter(){
GUITexture.Texture = rollOverTexture;
}
function OnMouseExit(){
GUITexture.Texture = rollOverTexture;
}
function OnMouseUp(){
audio.PlayOneShot(beep);
yield new WaitForSeconds(0.35);
if(QuitButton){
Application.Quit();
Debug.Log("this part works!");
}
else{
Application.LoadLevel(levelToLoad);
}
}
@script RequireComponent(AudioSource)
But unity say:
MissingFieldException: Field “unityEngine.GUITexture.Texture” not found
I don’t understand the problem =s
Can you help me?
Thanks in advance and sorry for my english ^^Bug with