Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    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:
    596
    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:
    102
    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