Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DarkMagicCK

Pages: [1]
1
Support / Re: Create SpriteCollection and SpriteAnimation at Runtime
« on: January 01, 2013, 03:19:45 pm »
Thanks for replying. I'll make an asset bundle and have a try.

2
Support / Create SpriteCollection and SpriteAnimation at Runtime
« on: January 01, 2013, 07:04:02 am »
Seems you did not see my apologize so I post again.

Hello, this is a great question troubling me these days.

Our boss needs game level DLC feature (using Asset Bundle), so I have no choice but to create all sprites at runtime. But then I'm got some prob.
I've worked out how to create SpriteCollection at Runtime, according to this post http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,935.msg4519.html#msg4519.

Note that my Resources or AssetBundle will include the SpriteCollection and SpriteAnimation which have already been done in editor.
I'm not asking how to create collection from png file or how to create animation using SpriteAnimationFrame.
So here are my questions:

  1. Resource.Load() will create an object instance, if I use Resource create the same SpriteCollection many times, will it take many spaces. That means, if my "collection1" has a texture, and I Resource.Load("collection1") for 2 times, will unity load 2 textures into space? Or I should need a hashtable to check if a SpriteCollection is created.

  2. I do not know if I can create SpriteAnimation using Resource.Load() because the SpriteAnimationFrame is based on different SpriteCollection. So if I want to create SpriteAnimation , do I need to Resource.Load() the Collection first? Or it's just impossible?

I really suggest you to add something like tk2dGlobal, which do something like:
Code: [Select]
bool tk2dGlobal.AddSpriteCollection("name in resource folder");
bool tk2dGlobal.AddSpriteAnimation("name in resource folder");//which will automatically add the needed collections
SpriteAnimationClip tk2dGlobal.GetAnimationClipInAnimationLibrary("clip name", "anim lib name");
SpriteCollection tk2dGlobal.GetSpriteCollection("name in resource folder");
GameObject tk2dGlobal.CreateSprite(clip);

Please help me solve this problem.

3
Support / Re: Runtime Create SpriteCollection and SpriteAnimation.
« on: December 30, 2012, 06:34:24 pm »
ah sorry, just use the rude words to describe my feelings about question, not to be impolite to you . Please help me to solve this.

4
Support / Runtime Create SpriteCollection and SpriteAnimation.
« on: December 30, 2012, 04:56:13 pm »
Hello, this is a great question fucking me these days.

Our boss needs game level DLC feature (using Asset Bundle), so I have no choice but to create all sprites at runtime. But then I'm got some prob.
I've worked out how to create SpriteCollection at Runtime, according to this post http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,935.msg4519.html#msg4519.

Note that my Resources or AssetBundle will include the SpriteCollection and SpriteAnimation which have already been done in editor.
I'm not asking how to create collection from png file or how to create animation using SpriteAnimationFrame.
So here are my questions:

  1. Resource.Load() will create an object instance, if I use Resource create the same SpriteCollection many times, will it take many spaces. That means, if my "collection1" has a texture, and I Resource.Load("collection1") for 2 times, will unity load 2 textures into space? Or I should need a hashtable to check if a SpriteCollection is created.

  2. I do not know if I can create SpriteAnimation using Resource.Load() because the SpriteAnimationFrame is based on different SpriteCollection. So if I want to create SpriteAnimation , do I need to Resource.Load() the Collection first? Or it's just impossible?

I really suggest you to add something like tk2dGlobal, which do something like:
Code: [Select]
bool tk2dGlobal.AddSpriteCollection("name in resource folder");
bool tk2dGlobal.AddSpriteAnimation("name in resource folder");//which will automatically add the needed collections
SpriteAnimationClip tk2dGlobal.GetAnimationClipInAnimationLibrary("clip name", "anim lib name");
SpriteCollection tk2dGlobal.GetSpriteCollection("name in resource folder");
GameObject tk2dGlobal.CreateSprite(clip);

So please help me solve this problem.

Pages: [1]