- Home /
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.
Can you post the code? Your error is useless without any code to diagnose.
Answer by Gabriel Quijada · Feb 22, 2013 at 09:41 PM
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.
Your answer
Follow this Question
Related Questions
Wierd Animation Bug 0 Answers
Array out of its own range? 4 Answers
Array Index out of range (JavaScript) 1 Answer
Random object, Array index out of range 0 Answers
array problem index out of range ? why ? 2 Answers