As most, I read about the new content directories and after reading the post about all the benefits it should have, I was excited to try it out!
Currently we make heavy use of assetbundles to distribute our content. We have a custom hardware solution for our customers, and we provide new content (games) through our own distribution solution. Essentially it boils down to the following:
We make a game inside the unity editor and build all the behaviour into a .dll file. All the content for that particular game is then build into an assetbundle. Through our distribution solution we update the .dll on the machine for our customers and we push the new content (assetbundle) on their machine. Our platform knows how, when and what to load to play the game.
We distribute new content and updates over the air to our customers (with a data limit) so reducing size would be very beneficial.
So I figured that the overall size and performance benefits would be a good thing to explore. As a test, I used one of our latest games. We always have a “one point of entry”, which is a scriptable object that serves as the main point of entry for the game, which would be perfect for content directories.
When I build the asset bundle, the size is about 110MB, but when I build the content directory, I end up with 990MB. I figured the assetbundles are probably compressed and content directories aren’t. Initially I built the content directory into an archive, but that seemingly doesn’t compress, just packs it up.
When I zip the content directory myself, it’s about 120MB, so that is getting closer.
I inspected the build report and next to some stray assets, it seems to be generally what I expect. I did see some .cs files and the .dll file I mentioned earlier, which I didn’t expect to be there.
The folder containing all the (raw) content is about 230MB in size, so I am a bit puzzled on why the content directory ends up so much bigger.
I currently tested it out as a direct replacement, so I didn’t use any of the loadable logic yet. Would that make any difference? Am I wrong in assuming that the file size would at least be comparable to that of an assetbundle without any changes?