Assetbundle is mostly used for DLC. You download a compressed package then uncompress it. Or use it immediately if asset was packed with LZ4 compression.
If care about build size and only publish in one-go. Then the best practice for now is using Resources
The game load all stuff in Resource immediately when “called”. The only downsize is you have to manually unload Resource if you dont destroy object that are using file in Resource.
In my case, I have to load 200 images 1080p in game. Using AssetBundle:
No compression: 5-8s open up scene.(99% CPU to uncompress everytime you load from Assetbundle)
LZ4 compression: 0.5s to load an image (with high priority). Took me a few minutes to see all Images (the game still run smoothly though).
Normal compression: smaller build size. 10-20s to open up scene and load all assetbundle for 1 session.
When using Resource: file build size = LZ4 assetbundle build.
All the images just instantly popup. Open scene only took 2-3s since no images was called.
RAM usage will increase to 400Mb if you do no unload Images not used.
Well I develop game for Android. The only fallback of Assetbundle is that it have to do uncompressing everytime I reopen the app and nothing was cached in disk except ads. Using Resource is much faster for loading on small project since there was not that many stuff to control like in Unity tutorial said.
And on older mobile device, phone heat up really fast when use assetbundle since it is CPU intensive.
We use assetbundles in many of the apps on several platforms without issues. We also use resources, though less frequently. Just have to use what is right for the particular feature. There has never been a heat issue with assetbundles either on mobile. They both have their uses.
Hi Brathnann,
I use AssetBundles for both iOS and Android.
But when downloading assetbundles from server on Android, it takes 10 times longer than on iOS!
Have you ever experience that?
Best
I haven’t. iOS tends to take longer just due to the assetbundle size and the compression on our images. For our text files that we have bundled, they are similar in size and both download about the same.
If it’s taking longer, compare the size of your bundles and if Android is much larger, you might want to see what is making it larger. If they are similar or Android is smaller, than I’m not sure what is having it take longer for you.
I am using sceneAssetBundles, they are bigger in iOS, but downloading fast. In Android, they are smaller due to compression - normal. For example, I have a scene-bundle that has 5 Mb, if I put it on DropBox server it takes more o less the same time to download (5 seconds) as the ios bundle, and it is fine. But if I use another server (on Android only) it takes like 50 seconds (10 x longer), I am using the same c# scripts just changing servers…
You should move on to Addressable System if have time to research.
And if you think it load slow because of objects numbers… Most likely you are using loading synchronous (wait for each assets load done before move next) and not asynchronous (load everything in parallel).
Or the project still load slow due to big files/scenes/textures, it might be bundles included too many asset not need right now in scene. Then chopping down assets into smaller bundles and load it as the game progress.
What Unity version?
What target platform?
What type of assets are they?
What size do these assets have?
How are you loading them?
Do you load all 300 assets or just a single asset from the bundle?