Hello Guest

Author Topic: "Invalid sprite collection found in clip." when creating animation clip  (Read 4433 times)

whynotmatt

  • Newbie
  • *
  • Posts: 5
    • View Profile
I am trying to make my first sprite animation. I've created my sprite collection and added in all the images that I need. I then create a new Sprite Animation and click on the "Open Editor" button. When I click the "create clip" menu item in the Sprite Animation editor, I get the error message: "Invalid sprite collection found in clip."

I am using Unity 4.3.4f1 on a Mac. What am I doing wrong?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Is this in an empty project?
Do you have any sprite collections that contain either invalid data?
Have you run the integrity checker in the 2D Toolkit menu - its worth checking to make sure your project is not corrupt.
And finally, try this in an empty project in the event that there is something broken in your current one.

whynotmatt

  • Newbie
  • *
  • Posts: 5
    • View Profile
This is not an empty project.

How do you tell if a sprite sheet has invalid data?

I ran the integrity checker and it said I was missing the tilemap classes. So I added those, but I still get the same error.

It seems to run ok in an empty project.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
It is likely that there is a sprite collection with some bogus data.
If you click on the -tk2d object in the root of the project, expand the Sprite Collection Index in inspector - look at the first thing in the index, is it a valid sprite collection? Does it have uncommitted data, broken data object, etc...
If its invalid, delete it and 2D Toolkit > Rebuild Index to see if that helps.

whynotmatt

  • Newbie
  • *
  • Posts: 5
    • View Profile
I looked in the -tk2d object and everything seems to be there. How would I know if a collection has uncommitted data or broken data?

Here is the error message displayed in the unity log.


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)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
I'm not sure - I've not seen this reported before. To make this simpler can you try and create a repro case and either attach it here / email support please?