Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

'IndexOutOfRangeException: Array index is out of range' Compilation Error

Discussion in 'Unity 5 Pre-order Beta' started by Tomza, Nov 3, 2014.

  1. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    594
    I upgraded my project from Unity 4.6 to 5.0 and I can't work because of the error in the Editor Log:


    IndexOutOfRangeException: Array index is out of range.
    at UnityEditor.Graphs.AnimatorControllerTool.ResetBreadCrumbs () [0x00046] in C:\buildslave\unity\build\Editor\Graphs\UnityEditor.Graphs\Animation\AnimatorControllerTool.cs:350

    at UnityEditor.Graphs.AnimatorControllerTool.ResetUI () [0x00000] in C:\buildslave\unity\build\Editor\Graphs\UnityEditor.Graphs\Animation\AnimatorControllerTool.cs:326

    at UnityEditor.Graphs.LayerControllerView.get_selectedLayerIndex () [0x0005e] in C:\buildslave\unity\build\Editor\Graphs\UnityEditor.Graphs\Animation\LayerControllerView.cs:28

    at UnityEditor.Graphs.LayerControllerView.Init (IAnimatorControllerEditor host) [0x000ca] in C:\buildslave\unity\build\Editor\Graphs\UnityEditor.Graphs\Animation\LayerControllerView.cs:128

    at UnityEditor.Graphs.AnimatorControllerTool.Init () [0x00016] in C:\buildslave\unity\build\Editor\Graphs\UnityEditor.Graphs\Animation\AnimatorControllerTool.cs:285

    at UnityEditor.Graphs.AnimatorControllerTool.OnEnable () [0x00000] in C:\buildslave\unity\build\Editor\Graphs\UnityEditor.Graphs\Animation\AnimatorControllerTool.cs:234
    UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean) (at C:\buildslave\unity\build\Editor\Mono\GUI\WindowLayout.cs:482)


    Do you know how to fix that?
     
  2. dustinandrew

    dustinandrew

    Joined:
    Apr 30, 2010
    Posts:
    96
    I just upgraded a project from 4.5 to 4.6 and also see this error spammed in the editor:
    IndexOutOfRangeException: Array index is out of range.
    SyntaxTree.VisualStudio.Unity.Bridge.WinPath.Combine (System.String left, System.String right)
    SyntaxTree.VisualStudio.Unity.Bridge.UnityProject.Folders ()
    SyntaxTree.VisualStudio.Unity.Bridge.UnityProject+<>c__DisplayClass18.<Serialize>b__15 ()
    SyntaxTree.VisualStudio.Unity.Bridge.UnityProject.ItemGroup (System.IO.TextWriter w, System.Action a)
    SyntaxTree.VisualStudio.Unity.Bridge.UnityProject.Serialize (System.IO.TextWriter w)
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectFile.WriteIfNecessary (SyntaxTree.VisualStudio.Unity.Bridge.FileGenerationHandler generationHandler)
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilesGenerator.GenerateProjectFiles ()
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilesGenerator+<>c__DisplayClass1.<.cctor>b__0 ()
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions ()

    UPDATE:
    Looks like UnityVS needed to be reimported.
     
    Last edited: Dec 2, 2014
unityunity