2D Toolkit Forum

2D Toolkit => Support => Topic started by: kliqingk on May 20, 2013, 02:45:05 pm

Title: I can't create a sprite.
Post by: kliqingk on May 20, 2013, 02:45:05 pm
Unity4.1.2f1 + 2D Toolkit 1.9.
After I creating a SpriteCollection, I clicked Create->tk2d->Sprite in the Hierarchy. But just a progress bar was shown.No Sprite created.
Please help me.
Title: Re: I can't create a sprite.
Post by: unikronsoftware on May 20, 2013, 02:52:36 pm
Any errors in the console?
Also 1.9 is not compatible with Unity 4.1 (they broke some stuff with that update). You should update to 1.91 + patch1, which is the latest on the asset store.
Title: Re: I can't create a sprite.
Post by: kliqingk on May 20, 2013, 04:23:24 pm
There is a error shown in the Console.
MissingReferenceException: The object of type 'tk2dIndex' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
tk2dEditorUtility.CreateIndex () (at Assets/TK2DROOT/tk2d/Editor/tk2dEditorUtility.cs:181)
tk2dEditorUtility.GetOrCreateIndex () (at Assets/TK2DROOT/tk2d/Editor/tk2dEditorUtility.cs:104)
tk2dSpriteEditor.DoCreateSpriteObject () (at Assets/TK2DROOT/tk2d/Sprites/Editor/tk2dSpriteEditor.cs:213)
Title: Re: I can't create a sprite.
Post by: unikronsoftware on May 20, 2013, 04:38:18 pm
That is precisely the error that 1.92 + patch1 fixes.
Updating is highly recommended.
Title: Re: I can't create a sprite.
Post by: kliqingk on May 22, 2013, 08:40:25 am
Thank you.
I updated. And it worked.