2D Toolkit Forum

2D Toolkit => Support => Topic started by: ItsMeAlan on May 05, 2014, 10:14:33 pm

Title: Corrupt animation collection?
Post by: ItsMeAlan on May 05, 2014, 10:14:33 pm
When I open this particular animationCollection, I see this:
(http://i.imgur.com/e1jCcpi.png)

When I try to view one of the animations, I  see this:
(http://i.imgur.com/zbjmLMY.png)


And I get this error:
Code: [Select]
NullReferenceException: Object reference not set to an instance of an object
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:566)
tk2dSpriteAnimationEditorPopup.OnGUI () (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationEditorPopup.cs:480)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)


All the sprites in this animationCollection are being pulled from the same atlas. I've rebuilt that spriteCollection, rebuilt my entire tk2d index, but I still can't retrieve these animations. I spent a lot of time on the timings of these animations and really don't want to lose them. Is there anything I can do?
Title: Re: Corrupt animation collection?
Post by: ItsMeAlan on May 05, 2014, 10:17:50 pm
I've noticed there's something a little wonky going on with the spriteCollection...

(http://i.imgur.com/gzcuDPf.png)
Title: Re: Corrupt animation collection?
Post by: ItsMeAlan on May 05, 2014, 10:49:25 pm
I fixed the issue by reverting back to a version of my project before the animationCollection had been corrupted (we're using SVN)!
Title: Re: Corrupt animation collection?
Post by: unikronsoftware on May 06, 2014, 11:28:30 am
Glad its sorted :)

If you see the prefab lose its icon its usually an indication that something has gone wrong.