Hello. I wanted to make this little feature when you press "b" a pop-up book appears and you can view different tabs with different textures and information, then when you press b again it closes the book. I haven't done anything like a pop-up before so I need some help. This is all I got so far, and I'm getting an error that says "Expressions in statements must only be executed for their side-effects."
#pragma strict
private var guiShow : boolean = false;
var riddle : Texture;
function Update ()
{
if (Input.GetKey("c"))
{
OpenBook;
}
}
function OpenBook()
{
if(guiShow == true)
{
GUI.DrawTexture(Rect(Screen.width / 4.5, Screen.height / 4, 1024, 512), riddle);
}
}
↧