How can I decrease the size of an Asset Bundle?

I have an assetbundle with some prefebs and models/materials/textures/audios/animations related to them.

The total size of all these files is about 96MB.
And the assetbundle is 207MB.

Then I tried to decrease the size of my models.
The file size comes to about 54MB now.
But the assetbundle is still 207MB (over 400MB without compress).

I understand there are some other information stored in the bundle.
I thought my effort may change something, but nothing changed.

These asserts do not depend on any other files, at least the assetbundle browser said that.
The new assetbundle is built with strict mode/force rebuild/clear folder options.

Why didn’t its size change?
How can I decrease the size of an Asset Bundle?

Thank you.


Append log for one of the assert bundles:

The original size in the folder is about 5.8MB.

What do you mean by “decrease the size”? Are you talking about reducing the complexity? Or are you referring to something that has to do with the file format of the model? Because Unity doesn’t use the original file format for the assets you add to your project. For example a PNG isn’t a PNG in a build.

Are you sure you were looking at the newly built asset bundle?

In any case like Ryiah says, you can best affect the size of assets by checking their Inspector settings. For example you can force a texture to a specific format or compression or limit its dimensions. That will affect the size of the asset and thus the bundle.

I used to import .blend files directly into the editor.
I change them to .fbx now, which is smaller.
But like you said, they might be changed to another format, so this doesn’t work.

Is there a way to check out the actual assets’ format and size in the bundle?
When I am looking at the assetbundle in the asset bundle browser, I can only see the known 50M files.

I wouldn’t import .blend or .psd in a project. Yes, it’s convenient. But it comes at a processing cost of importing those “source” assets which can slow down the editor more than when using a game-specific format (fbx, png).

Not that I know of.

Check the size of the file on disk. The bundle browser may not necessarily show you the actual bundle file’s size.
For instance, the editor.log also contains a build report after making a build but it lists the uncompressed (original) sizes of assets not the output size, thus often misleading developers into optimizing things that aren’t as big as they think they are.

Both 50+M and 207M are the actual sizes of the files on my disk.
There’s such a big gap that makes me really confused before.
Now I know the reason of the difference.
But still trying to reduce the size.

I found the log file.
It says the mesh consumes 99% of the size, which is 428M.
After compressing it becomes 207M.
But my original fbx models are a total of 28.6M.
Nearly 10 times the size.

I already compressed the mesh at a medium level.
The surface becomes corrupt with high-level compressing.

Are you sure you’re including the correct files?

I checked every file in the manifest.
Unless the Unity editor is lying to me.

Let me show you the log:

This picture shows the size in Byte, UtsuhoMech.fbx is about 5.8MB.
The total size of the fbx files and textures is about 30MB.
9790950--1405146--upload_2024-4-24_21-37-56.png

This is one of my assetbundles.

There’s no “might”. That’s precisely what’s happening. Internally Unity uses .FBX for the import chain. When you try to “import” Blender’s custom format Unity uses Blender’s command line arguments to execute a script that imports it into Blender and then exports a .FBX. It’s why Blender has to be installed. Unity can’t read them.

That’s just for the import pipeline though. At runtime in builds Unity doesn’t work with FBX. It works with a custom format meant for the engine to quickly and efficiently load mesh data. Often this results in a larger size on disk for the data. For example PNGs and JPGs becoming DXT, BC, ETC, ASTC, etc depending on the platform.

Is the size of the textures related to the expansion of the mesh?
I still have no clue.

I tried to decrease the quality of the texture and use high-level mesh compression.
These attempts reduce the bundle by about 7M at last.
This isn’t very sensible compared to nearly a hundred times the expansion of the mesh size.

Now I know the theory, but still have no solution.
Or maybe there isn’t any solution for this issue.

Basically, what you’re trying to do to the source file will have no effect on the file in a build. It’s a completely different format with a completely different compression scheme. If you need to reduce file sizes you do it by removing or simplifying assets (ie less mesh details, smaller textures, etc).

So this is the final solution I guess.
Reduce the mesh quality manually.
Okay, thank you.