2D Toolkit Forum

2D Toolkit => Support => Topic started by: zeusrami on May 14, 2014, 04:24:55 pm

Title: atlas memory managment
Post by: zeusrami on May 14, 2014, 04:24:55 pm
The atlas is loading into memory only when it is need it?
In my game i use only 10 elements and after 10 minutes I use another 10 elements diferents , and the previous elements I donīt use it anymore. It is better to create 2 small atlas that contains only the 10 elements that I use every time Or it is better to create only one atlas that contains everything.

Thanks,
Ramiro
Title: Re: atlas memory managment
Post by: unikronsoftware on May 15, 2014, 10:09:43 pm
2 atlases probably, but if you only need 20 elements in total and your game doesn't need to keep switching, AND they all fit in memory - why bother? Just keep them in one atlas and be done with it.
Title: Re: atlas memory managment
Post by: zeusrami on May 18, 2014, 12:14:48 am
Yes but it if I can partition in 2 atlas, I can have 2 atlas of 1024x1024 instead of one of 2048. So it is less space in memory running 1 atlas (with the 10 elements that i need ) and then the other. Am I right?

My questions was because my game was slow And  maybe this could help.

Thanks,
Ramiro
Title: Re: atlas memory managment
Post by: unikronsoftware on May 18, 2014, 06:41:54 pm
You will have 2 1024x1024s or 1 2048x1024 unless you ask for square atlases. Shouldn't be too different.
I doubt this is what is slowing down your game, you should run your game through the unity profiler to find out why its slow.