Hello Guest

Author Topic: Index out of range when creating animations  (Read 2933 times)

ohad11

  • Newbie
  • *
  • Posts: 3
    • View Profile
Index out of range when creating animations
« on: October 31, 2013, 06:36:05 pm »
When creating long sprite animations I get a IndexOutOfRange exception in the sprite animation editor inside of tk2dSpriteAnimationClipTimelineEditor::DrawFrameGroupEx and tk2dSpriteAnimationClipEditor::DrawPreview. In both cases the fg.spriteId is -1. Any ideas on how to fix this? Here is the stack trace:
Code: [Select]
IndexOutOfRangeException: Array index is out of range.
tk2dEditor.SpriteAnimationEditor.TimelineEditor.DrawFrameGroupEx (Rect r, .tk2dSpriteAnimationClip clip, tk2dEditor.SpriteAnimationEditor.FrameGroup fg, Boolean highlighted, Boolean showTime, Boolean playHighlight) (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipTimelineEditor.cs:525)
tk2dEditor.SpriteAnimationEditor.TimelineEditor.DrawFrameGroups (Int32 controlId, Rect frameGroupRect, .tk2dSpriteAnimationClip clip, System.Collections.Generic.List`1 frameGroups, Single clipTimeMarker) (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipTimelineEditor.cs:211)
tk2dEditor.SpriteAnimationEditor.TimelineEditor.Draw (Int32 windowWidth, .tk2dSpriteAnimationClip clip, System.Collections.Generic.List`1 frameGroups, Single clipTimeMarker) (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipTimelineEditor.cs:158)
tk2dEditor.SpriteAnimationEditor.ClipEditor.Draw (Int32 windowWidth) (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipEditor.cs:622)
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/c514da0c8183631c/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
UnityEditor.PopupCallbackInfo:SetEnumValueDelegate(Object, String[], Int32)
Code: [Select]
IndexOutOfRangeException: Array index is out of range.
tk2dEditor.SpriteAnimationEditor.ClipEditor.DrawPreview () (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipEditor.cs:274)
tk2dEditor.SpriteAnimationEditor.ClipEditor.Draw (Int32 windowWidth) (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipEditor.cs:611)
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/c514da0c8183631c/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

ohad11

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Index out of range when creating animations
« Reply #1 on: October 31, 2013, 06:54:05 pm »
Recreated some of my sprite collections and all is good now!