I am trying to make a scene where when you click on an object (like a hotspot) a window pops up on the screen like in the screenshot. I got this to work using GUI textures however once the pop up displays it stays on the screen. Is there a way for me to click the texture and make it disappear?
Here is my code:
#pragma strict
private var guiShow : boolean = false;
var riddle : Texture;
function OnMouseDown () {
guiShow = true;
}
function OnGUI()
{
if(guiShow == true)
{
GUI.DrawTexture(Rect(Screen.width / 4.5, Screen.height / 4, 1024, 512), riddle);
}
}