2D Toolkit Forum
2D Toolkit => Support => Topic started by: gdeglin on April 24, 2013, 10:05:01 am
-
Somehow I broke things in such a way that I am no longer able to create new animation clips even though I can create sprites just fine. I get the following errors when I create a clip...
"Unable to find any sprite collections (from the GetDefaultSpriteCollection method)" followed by ...
NullReferenceException: Object reference not set to an instance of an object
tk2dSpriteAnimationEditorPopup.CreateNewClip () (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationEditorPopup.cs:357)
tk2dSpriteAnimationEditorPopup.<DrawToolbar>m__33 (System.Object userData, System.String[] options, Int32 selected) (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteAnimationEditor/tk2dSpriteAnimationEditorPopup.cs:395)
I tried removing all 2d toolkit plugin files and re-installing from the asset store but this seems to break lots of stuff. Specifically, I get multiple define errors between my TK2DROOT/tk2d/Code/* directories and my Plugins/tk2d/* directores.
If I copy the the TK2DROOT/tk2d/Code/* directores into the Plugins/tk2d folder (as the Setup For Javascript command normally does), most of the errors go away. But I still get an error that says "The type or namespace name `tk2dClippedSpriteSample' could not be found." ... which is weird because I thought this was renamed to just tk2dClippedSprite instead of tk2dClippedSpriteSample in 1.92. And in either case, my clip creation problem is not solved.
-
The problem just got even stranger (but hopefully closer to a solution...)
If I remove multiple platform support, I am able to create a clip just fine. But once I add 1x, 2x, and 4x I get the same error as above.
-
Ok I found a solution. Creating a throw-away sprite collection that has no multiple platforms enabled seems to make things work.
-
I take it you've not imported or deleted the demo sprite collections?
I thought I resolved this a while back, but perhaps not... what version of Unity & 2D Toolkit are you using?
-
Yeah I excluded the demo files. Version 1.92 final. Unity 4.1.2f1
-
I've added that to the TODO for 2D Toolkit 2.0
-
Update - this has been fixed in 2.0.