I’m developing a game on Iphone/Android which will use a huge number of bitmaps.
For now, all my bitmaps are stored in Resources and loaded using Resources.Load().
But it seems the bigger Resources are, the longer and more troubles at the game launch.
What’s the best practice in this case :
1/ as I do now : 1 resources directory, and all textures inside. ( 1 dir * 1000 textures )
2/ Many different resources directories, with few textures inside. ( 500 dir * 2 textures )
3/ Using asset bundles? Many different assets bundles, with few textures inside. ( 500 dir * 2 textures )
Pretty hard to answer in a general way.
IF you have a way of intelligently grouping the assets, I would definitely go for assetbundles. By grouping the assets I mean for example, if you know beforehand that ceratin assets will be used in certain areas of your game, you are better off using assetbundles. On the other hand; if any asset could be needed/requested at any point in the game, I guess you are out of luck, since you will need to have access to any resource at any time, you will have to take the loading/indexing hit at the very start of the game.
well, my loadings are only done at the launch of the scene.
I have a huge number of bitmaps (let’s say 1000), but only load a few ones ( let’s say 2 ) depending on parameters.
1/
So the best thing would be to make 500 assets bundles of 2 textures for instance, in order to make the loading fast and avoid memories pbs?
2/
Why not 500 resources dirs * 2 textures instead, what would be the difference? Why not one asset bundle by texture?
3/
Does that imply that to get some texture from a resources directory, the whole directory resources are loaded to get the good one? ( implying long loading delays and eventual memory troubles?