C#IndexOutOfRangeException:Arrayindexisoutofrange怎么解决
usingUnityEngine;
usingSystem.Collections;
publicclassscript_10_03:MonoBehaviour{
x05Object[]texmube;
x05intnumber=1;
x05
x05//Usethisforinitialization
x05voidStart(){
x05texmube=Resources.LoadAll("Texture");
x05}
x05voidOnGUI(){
x05x05DrawImageNumber(0,100,number,texmube);}
x05voidDrawImageNumber(intx,inty,intnumber,Object[]texmube)
x05{char[]chars=number.ToString().ToCharArray();
x05x05Texture2Dtex=(Texture2D)texmube[0];
x05x05intwidth=tex.width;
x05x05intheight=tex.height;
x05x05foreach(charsinchars)
x05x05{inti=int.Parse(s.ToString());
x05x05x05GUI.DrawTexture(newRect(x,0,width,height),(Texture2D)texmube[i]);
x05x05x05x+=width;
x05x05}}
x05//Updateiscalledonceperframe
x05voidUpdate(){
x05
x05}
}