Performance of many collections

Let’s say I have 10 collections full of things.
Would there be a performance difference if I decrease their amount, meaning I have less, but bigger collections?

Going to give the best answer I can based on my rudimentary knowledge:

If you need to have 10mb of assets loaded at the same time, it doesn’t matter if they are divided among two 5mb collections, or ten 1mb collections.

It’s the resources included in each collection that counts when it comes to performance.

The advantage of collections is that you can load and unload them dynamically.

If, for example, you have a game with many levels, you might put each level into a separate collection, and load/unload them dynamically. You don’t want to load every single level of your game at the same time.

With that said, if you are just starting out, don’t worry about collections and performance. Unless you are making a VERY big game, it’s totally fine to just have everything in one collection, assuming that suits the style of game you are making.

8 Likes