Hi guys, can someone help me by clarifying something. I am just looking at how to do asset bundles, and not sure if I’m doing things right here.
Before I created an asset bundle of my resources my build package was 35MB for my scene.
I created an asset bundle of the resources which is 25MB, which I can understand with 3d modelling in it.
When I build again after creating the asset bundle, the package is still 35MB… have I missed something in this? should an asset bundle not reduce the main project size by splitting off the resources to be able to be downloaded when called?
anyone able to point out if this is what is supposed to happen or not?
As I understand:
You moved some of your prefabs into asset bundle, that is an external data file which may be read from at runtime. So I believe you should now remove those assets from your project, otherwise they will be packed into your executable which is what you don’t want.
Usualy you need two independent projects: one with assets only to create assetbundles, and second with very game.
Then you ship your game with two files(or more): executable file, assetbundle file(s).
If you believe that assetbundle is some form of super-compression then you are mistaken. When Unity packs resources into executable it uses almost identical algorithm. Asset bundles are for splitting data and code. Code often takes little space, resources take a lot more. So if you split data into many bundles you may first load executable(which is fast), then load only required data at start of game and load other data when there is need for them. On the other hand keeping data and code into single executable takes more time to load but at game start you have every resources you need.
thnaks Kefrens,
that does explain things a bit better. I had been looking over manuals and tutorials about it, but none of them mentioned removing them from the project after exporting to an assetbundle and setting up the callfromwwworcache, so wasnt even sure if they SHOULD be removed.