- Home /
Resources vs Asset Bundles vs file://
So, I've done a bit of reading around the forums about AssetBundles and the Resources folder, and I can't figure out the optimal solution for the problem I'm facing. Here's the problem:
I've got a program designed for standalone, that loads "books" full of .png and .jpg images. At the start of the scene for any "book", it's loading all those images at once using www.texture and a path. I'm realizing now, however, that this is possibly an non-performant method for accessing things at runtime -- it's slow! Which means the user can't do anything for 5-20 seconds while the scene starts and the book's page images load up (on non-legendary computers). SO, I can't figure out which of the three things would be the fastest:
1) Loading one asset bundle per book (say 20 textures @ 1 mb each).
2) Loading one asset bundle per page (1 mb each).
3) Either of the first two options, but loaded from the resources folder.
Which one would be faster, and why? I understand that asset bundles are packaged by unity, but does this mean that the textures inside will be pre-compressed and easier on memory at load time?
Also, bonus question: does the resources folder have its own method of being compressed as well (something to do with it being in binary) which causes it to be faster? As I understand it, the resources folder loads into a cache -- but is it the same cache that the standalone player uses normally? Or is this extra, unused space?
Cheers, folks...
In your scenario, are you trying to load the same images every time, or are these user supplied or dynamic images that you are loading? Depending on how the images are used, you could potentially get away with loading a few starter images, then loading more images on idle/as needed?
Hey, thanks for your help. The images are the same every time, in this iteration of the project. But the hope is that, in the future, the project will be able to handle user-supplied images.
Agreed with loading a few starter images -- I had also planned to create something like the youtube progress bar, where the available/loaded parts of the book were a different shade than the rest of the book. But this seems like a lot of work to load a few images, and if there was a significantly faster way to load them (rather than www.texture and file://), then I'ld prefer to do that rather than creating a whole visual mechanic for the user knowing what they can and cannot see. You know?