2D Toolkit Forum

2D Toolkit => Support => Topic started by: zynbasil on January 02, 2014, 02:34:35 am

Title: About collection Memory
Post by: zynbasil on January 02, 2014, 02:34:35 am
I test collection in ios.

Make a collection with many pic.  (create about 14 atlas)

Create sprite just use one pic in this collection, then I open profiler check the memory, i found all atlas load in memory.   

This case can be solved? or  what can I do ?

Title: Re: About collection Memory
Post by: unikronsoftware on January 02, 2014, 05:30:39 pm
That how memory management in Unity works. Only use multi atlas spanning for long animations where you need all of them resident in memory. Otherwise create separate atlases explicitly.
Title: Re: About collection Memory
Post by: zynbasil on January 03, 2014, 02:57:15 am
How can I remove  null used atlas when game running ? 
Title: Re: About collection Memory
Post by: unikronsoftware on January 03, 2014, 12:37:34 pm
Destroy the sprites using the sprite collection, then call Resources.UnloadUnusedAssets.
Title: Re: About collection Memory
Post by: zynbasil on January 03, 2014, 03:02:56 pm
Can I Auto create many collection with pic name?

case:

pic:

a_1.jpg  a_2.jpg .....
b_1.jpg  b_2.jpg .....

create collection:

a_collection
b_collection

May be tk2d next update?
Title: Re: About collection Memory
Post by: unikronsoftware on January 04, 2014, 10:51:45 pm
There is something planned for tk2d 2.4
https://trello.com/c/2D1OPlnP/26-importing-animations-and-sprite-collections-from-xml-text-file-from-an-editor-script
Title: Re: About collection Memory
Post by: zynbasil on January 07, 2014, 07:22:14 am
excellent!!! :-* :-* :-* :-*