Hello Guest

Author Topic: How to fix IndexOutOfRangeException?  (Read 4248 times)

J. Park

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
How to fix IndexOutOfRangeException?
« on: June 20, 2013, 09:40:43 am »
I use version 2 beta 1
Today I get error message when I select specific sprite collection in SpriteAnimation Editor window.
What did I do wrong?
How can I fix it?

Error Message -----------------------------------
IndexOutOfRangeException: Array index is out of range.
tk2dSpriteGuiUtility.SpriteList (System.String label, Int32 spriteId, .tk2dSpriteCollectionData rootSpriteCollection) (at Assets/TK2DROOT/tk2d/Editor/tk2dSpriteGuiUtility.cs:186)
tk2dSpriteGuiUtility.SpriteSelector (.tk2dSpriteCollectionData spriteCollection, Int32 spriteId, .SpriteChangedCallback callback, System.Object callbackData) (at Assets/TK2DROOT/tk2d/Editor/tk2dSpriteGuiUtility.cs:102)
tk2dEditor.SpriteAnimationEditor.ClipEditor.DrawFrameInspector () (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipEditor.cs:317)
tk2dEditor.SpriteAnimationEditor.ClipEditor.DrawInspector () (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipEditor.cs:488)
tk2dEditor.SpriteAnimationEditor.ClipEditor.Draw (Int32 windowWidth) (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipEditor.cs:561)
tk2dSpriteAnimationEditorPopup.OnGUI () (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationEditorPopup.cs:488)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
UnityEditor.PopupCallbackInfo:SetEnumValueDelegate(Object, String[], Int32)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to fix IndexOutOfRangeException?
« Reply #1 on: June 20, 2013, 09:47:10 am »
You shuold update to v2 + hotfix 2 - that fixes this issue. Or you can use the ... button to select your sprite, that works as normal.

J. Park

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: How to fix IndexOutOfRangeException?
« Reply #2 on: June 20, 2013, 09:53:21 am »
Thanks. It was fixed.