2D Toolkit Forum
2D Toolkit => Support => Topic started by: dyunarion on June 17, 2013, 11:53:38 am
-
hi
i want to use assetbundle of 2dtoolkit.
how can i do?
i already put the "tk2dSpriteCollectionData" component to the assetbundle, and load.
BuildPipeline.BuildAssetBundle(Selection.activeObject, Selection.objects, path,
BuildAssetBundleOptions.CompleteAssets | BuildAssetBundleOptions.CollectDependencies);
but, i don't know how to use this object in assetbundle.
whenever i use a sprite, it worked well.
but, when i try to open the tk2dSprite component, unity to give me a message.
"Unable to find sprite collection. this is a serious problem."
and the process box too. (Rebuilding Index/ Scanning project folder)
help me plz. T_T
-
what version of 2D Toolkit are you using?
-
using 2D Toolkit Version 2 final
-
I'll investigate.
-
ok. i'll wait, thx :D
-
tk2dSpriteGUIUtility.cs
Change line 309 from
if (currentValue == null || currentValue.dataGuid == TransientGUID)to
if (currentValue == null || AssetDatabase.GetAssetPath(currentValue) == "")
That should fix the issue.
-
thanks.
now it works very well.
but i still wonder why Anim Lib (tk2dSpriteAnimator) is different from original name in assetbundles.
current Anim Lib name is another thing. (another tk2dSpriteAnimation's name)
do i ignore it? :'(
-
What is the name? It simply gets the name from the asset itself, but there could be some wierdness going on due to it being in a bundle. Should be safe to ignore, I think.
-
thank for reply.
I mean, the name is tk2dSpriteCollectionData's SpriteCollection name in assetbundle.
for example...
I put the tk2dSpriteCollectionData to the assetbundle.
this tk2dSpriteCollctionData's SpriteCollection name is 'enemy_01'.
and I load the assetbundle, play sprite.
I think, this sprite's collection name is 'enemy_01'.
but this collection name is another name!
did I do something wrong...?
I'm bad at english. but please understand me. :)
-
You mean it is showing as "-" ? That is expected...
-
no. not "-".
I know that.
i mean, another collection name.
for example
I made SpriteCollection 'a' before.
and I load assetbundle, this Collection's name is 'b'.
when I play sprite, i think the sprite's collection name is 'b'!
but showing 'a' or another name (another collection names)
-
I don't think I know how this is happening. Can you send me an example to support at unikronsoftware dot com?
-
ok.
I will send you an example tomorrow. :)
-
I just sent the mail (support@unikronsoftware.com)
Please check ans reply. :)