Hi guys, i’m creating a inventory, i want to add my GUISkin to it. There’s a problem though, if i add it in, i get an error saying that it couldn’t be found, here have a try for yourself, thanks.
#pragma strict
var InventoryEnabled = false;
var InvWindow : Texture;
var InvClose : Texture;
var Grids : Texture[];
var SideBar : Texture[];
var IlluminatiSkin : GUISkin[];
private var GridValue : float = -1;
function Update(){
if(Input.GetKeyDown("c")){
if(InventoryEnabled == true){
InventoryEnabled = false;
Time.timeScale = 1;
AudioListener.volume = 1;
Screen.showCursor = false;
GetComponent(MouseLook).enabled = true;
}
else if(InventoryEnabled == false){
InventoryEnabled = true;
AudioListener.volume = 0;
Time.timeScale = 0;
Screen.showCursor = true;
GetComponent(MouseLook).enabled = false;
}
}
}
function OnGUI ()
{
GUI.skin = IlluminatiSkin;
if(InventoryEnabled == true)
{
GUI.Box(Rect(Screen.width /2 - 280,Screen.height /2 -280 ,650,500), InvWindow);
//Grid
GridValue = GUI.SelectionGrid(Rect(Screen.width / 2 - 210, Screen.height / 2 - 200, 500, 200), GridValue, Grids, 4);
//Side Bars
}
}