hi,
i am writing simple script to loading textures and assign this textures to buttons but nothing happening.My debugging works perfectly but buttons not appears.Any help wourld be great.
Thanks
here is my script
var Textures : Object[];
function LoadTextures()
{
Textures = Resources.LoadAll("Textures",Texture2D);
}
function OnGUI(){
if(GUI.Button(Rect(Screen.width-177,0,175,30),"Textures"))
{
LoadTextures();
for (var i in Textures)
{
GUI.Button(Rect(Screen.width/2,Screen.height/2,100,100),i as Texture2D);
Debug.Log(i.ToString());
}
Debug.Log(Textures.Length);
}
}