Hello. Here is my problem:
I have an array of textures to show in a GUI box.
var items : Texture[];
var textura1 : Texture;
var textura2 : Texture;
var textura3 : Texture;
var item1 : Texture;
I asign all textures in the inspector and update them in the array:
function Start(){
items[0]=textura1;
items[1]=textura2;
items[2]=textura3;
item1 = items[1]; // I try to change the index of the array...
}
and I use it…
function OnGUI() {
GUILayout.BeginArea (Rect (0,Screen.height -40,Screen.width,40));
GUILayout.BeginHorizontal();
GUILayout.Box(item1);
}
I cant see any texture.
why?