Array index is out of Range!?

We are currently using Unity and JIBE, which comes with pre-existing avatars for us to use. After clothing the JIBE avatar in Maya, we re-imported it to Unity to use. There is an array with 14 elements total (13 avatars within each 0-13 elements)and we’ve decided to create another element (15) for our new avatar. When testing, this popped up:


Array index is out of range.: at ChooseAvatar.OnGUI () [0x003d8] in C:\Users\UCSim007\Desktop\UCSIM ASSETS\Unity & Jibe Assets\Unity Poccent Assets\JIBE_POCCENT\Jibe1.4.2\Jibe1.4.2\Assets\RGScripts\ChooseAvatar.cs:403
UnityEngine.Debug:Log(Object)
ChooseAvatar:OnGUI() (at Assets/RGScripts/ChooseAvatar.cs:412)

Now we can’t start any scenes up within the Unity player and we receive the same message. Our programmers can’t seem to figure it out, and we’ve even reverted back to older versions of our files, and still get the same message.

Maybe that is because you are creating the avatar in the position [14] and if your array lenght is 14 that position doen’s exist, are you expanding your array first? I work whit lists for the flexibility. Try that. good luck for you.