2D Toolkit Forum

2D Toolkit => Support => Topic started by: pan_henryk on August 11, 2014, 10:58:56 am

Title: Best way of caching sprite collection
Post by: pan_henryk on August 11, 2014, 10:58:56 am
Hi,

I am wondering what is the best way of caching (preserving between scene reloads) for sprite collections.
What shall we mark with DontDestroyOnLoad - tk2dSpriteCollectionData or directly atlas textures? (we have 3 platform versions of each atlas)

thanks,
Title: Re: Best way of caching sprite collection
Post by: unikronsoftware on August 11, 2014, 10:26:34 pm
Keep a sprite using the collection in the scene, and set it to DontDestroyOnLoad and SetActive(false). At least that way you can just delete that and unloadunusedassets when you're done with it.