I have this script for a dialogue Box:
var showMessage : boolean;
var someRect : Rect;
var someMessage : String;
var speechbubble : Texture2D;
function OnGUI() {
if(showMessage){
GUI.Label(someRect,someMessage);
GUI.DrawTexture (speechbubble);
}
}
function OnTriggerStay(){
if(Input.GetKeyDown(KeyCode.T)){
showMessage = true;
}
else if(Input.anyKeyDown){
showMessage = false;
}
}
But the texture doesn't show up, i get an error in compiling :
Assets/Dialogue Box.js(8,27): BCE0023: No appropriate version of 'UnityEngine.GUI.DrawTexture' for the argument list '(UnityEngine.Texture2D)' was found.
How do I get it to draw the texture, or just a gui box, behind the speech??