MingMan
MingMan

Reputation: 920

Using AssetBundle in Unity INCREASES Memory Allocation

i have a login scene which goes to a dashboard scene then to one of many gametype scenes. I decided to asset bundle the different scenes to make it so that i don't have to allocate every image and prefab all the time. The problem is, using asset bundling made my game less efficient. I ran the profiler with and without bundle asset capability. So both tests go from login scene -> dashboard scene, can anyone explain this?

WITH BUNDLE ASSETS login scene total memory allocated: 0.78GB after transition to dashboard scene total memory allocated: 0.99GB

WITHOUT BUNDLE ASSETS login scene total memory allocated: 0.76GB after transition to dashboard scene total memory allocated: 0.82GB

I also tested on WebGL both versions, and once i got to the dashboard on each version, there was a 10% decrease in fps in the bundle asset version. So the version with bundle assets had a lower frame rate and higher memory allocation. Just the opposite of what i was trying to do, any ideas of what could be going on?

And for the record i removed the scenes I'm loading from the build settings when testing the bundle asset versions

Thanks Mitch

Upvotes: 1

Views: 597

Answers (1)

Grelak
Grelak

Reputation: 36

Maybe this can help you AssetBundle Compression Overhead

Also, are you unloading the AssetBundles once you have instantiated the objects with Unload(false). If not, I think you will have in memory both the asset and the bundle.

Upvotes: 1

Related Questions