- Home /
Nested Prefabs in Asset Bundle
Hi I have an android project which is very heavy. Most of the weight comes from my scenes. As I understand it Asset Bundles could reduce the weight since all my scenes share the same prefabs but those prefabs are nested. I should therefore create an AssetBundle per scene and an AssetBundle containing all the prefabs and their dependencies. I have done it but the amount of gained space is quite low. I have been searching information about nested prefabs and assets bundles but found nothing so far. What I am doing wrong ?
Thanks
Edit : The extensive size of my scenes came from the Static Batching. No real solution here...
Have you unchecked or removed the scenes from build settings so that all the assets the scenes reference don't go into the build? $$anonymous$$ake sure you don't have a lot of assets under Resources folders.
Answer by FortisVenaliter · Oct 05, 2017 at 07:45 PM
Noooo... That is not at all what AssetBundles are for. AssetBundles are for delivering new content from outside the initial game installation. To download and integrate DLC, for example. It has no bearing on how fast content loads. And while it may reduce the initial install size, the player would still need to download the same assets, so the final size would be virtually the same as original (if not a bit more for overhead). In short, AssetBundles are simply not useful for reducing total install size.
What you actually want to do is go through your assets and see what you can do to reduce them individually. Movies and audio can be more tightly compressed for minimal quality losses (especially when talking about mobile speakers/headphones). Textures can also be better compressed, or you can remove useless or whitespace bits to make them smaller.
There is no magic button to reduce the installation size, unfortunately. Just be glad you aren't trying to deliver a AAA title on a DVD... That's a real work of magic.
Thanks for the heads up. But in the editor log Levels takes 50% of my build size.
Yes, because they include all assets that the level includes. If you move those assets into AssetBundles or Resources, it won't reduce their size, it will just change their deployment method.
Your answer
Follow this Question
Related Questions
Editor utility for handling nested prefabs.. 4 Answers
Re-load prefabs from assetbundles got null components 0 Answers
Howt to Replace uGUI with asset bundles 0 Answers
Nested Prefab 0 Answers
.Asset vs .Prefab vs. .Unity3d ? 1 Answer