2D Toolkit Forum
2D Toolkit => Support => Topic started by: mr_malee on April 10, 2014, 01:34:14 am
-
Not sure how this happened, but whenever I try to create a new animation clip after creating a new sprite animation I get this error popup:
Invalid Sprite Collection found in clip. Please correct this in the inspector.
then Unity outputs this error:
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[tk2dEditor.SpriteAnimationEditor.ClipEditor+FrameGroup].get_Item (Int32 index) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
tk2dEditor.SpriteAnimationEditor.ClipEditor.DrawFrameInspector () (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipEditor.cs:367)
tk2dEditor.SpriteAnimationEditor.ClipEditor.DrawInspector () (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipEditor.cs:539)
tk2dEditor.SpriteAnimationEditor.ClipEditor.Draw (Int32 windowWidth) (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationClipEditor.cs:612)
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 /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
The errors don't stop and I have to force quit Unity.
Currently unable to make new animations :(
I've tried rebuilding index and checking integrity, everything reports ok.
I have 3 sprite collections with 2 platforms (UI, Game, Fonts). They all compile fine, no errors output.
-
1. Try rebuilding the index (2D Toolkit > Rebuild Index)
2. Find all sprite collections in the project (expand the -tk2d object to see what tk2d knows about). Maybe there is something corrupt in the project? If you do find a corrupt one, delete it and rebuild index
-
Is there anything specific I should be looking for? Everything looks fine in the collection. I've tried rebuilding the index as well.
In order to create new animations I have to duplicate an existing one then modify.
-
ah found it.
it was my Font sprite collection. For some reason having 2x platform fonts seems to break the animation system.
I removed all platforms from my font sprite sheet, recompiled, rebuilt index.
Now I can create new animations :)
But I've just lost HD fonts :(
-
Lost HD fonts how? Have you tried restarting Unity?
-
what I mean is, if I add a 1x and 2x platform in my Font Sprite Collection (collection which only contains 1 font) and commit. I'm then unable to make animations.
Maybe I don't understand the workflow for 2x fonts.
1. Create a font and png at 1x (font size 16)
2. Create a font and png at 2x (font size 32)
3. Add the 1x font into the sprite collection
4. Put 2x font into a sub folder named "2x", name font.png "font@2x.png", name font.txt "font@2x.txt"
Is there something else I need to do?
I've attached a test project that replicates the problem. Try and create a new animation clip in the "TestAnimation" sprite animation.
-
You don't seem to have any sprites in your project - you've also deleted the samples folder which would have had a few valid sprites in there. You can't create an animation while you don't have any valid sprites in the project.