Hello Guest

Author Topic: Using spritecollections instead of resources.load  (Read 3046 times)

luniac

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 23
    • View Profile
Using spritecollections instead of resources.load
« on: November 23, 2014, 07:09:14 pm »
I know that resources.load can be used to individually load assets into memory in order not to overload it all at once in case there's too many assets to be used in the game at once.

So if I use a  sprite collection with loadable checked off, it wouldn't load the whole atlas into memory upon starting the game?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Using spritecollections instead of resources.load
« Reply #1 on: November 23, 2014, 09:25:54 pm »
Quote
So if I use a  sprite collection with loadable checked off, it wouldn't load the whole atlas into memory upon starting the game?
If you use a sprite from a collection in your scene, it will be loaded. Anything else that isn't used in that scene will not be loaded.

You can use resources.load to load in specific ones that you need, but this means constructing the sprites dynamically from code.