Hello Guest

Author Topic: Best way of caching sprite collection  (Read 3047 times)

pan_henryk

  • Newbie
  • *
  • Posts: 20
    • View Profile
Best way of caching sprite collection
« 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,

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Best way of caching sprite collection
« Reply #1 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.