I have an inventory system that stores all my images into an array but I’m not sure exactly how I would hide / show my array. I know how to hide guiText and images but not something stored in an array. any help ?
Maybe you can make a button, to show the inventory when clicked?
It can be done like this:
showInventory = false;
function OnGUI () {
if (GUI.Button (Rect (10,10,100,20), "Show inventory"))
showInventory = true;
if (showInventory) {
//show the array here
if (GUI.Button (Rect (120, 10,100,20), "Hide inventory")) {
showInventory = false;
}
}
}
Hope this helps, cheers!