I’ve been studying Asset Bundles for purposes like memory management and general project loading optimization.
It’s a broad topic with many links to other inner unity architectural details.
I have a relatively basic question that I couldn’t figure out myself. In the following scenarios with included simple memory profiler data the only difference is that the same scene is loaded from Streaming Files using
AssetBundle.LoadFromFile(path) API and using
var scenePaths = loadedAssetBundle.GetAllScenePaths();
SceneManager.LoadSceneAsync(scenePaths[0]);
Ignoring the GfxDriver usage the main difference is coming from the title "Unity" which is as far as I understand natively managed memory which is readonly and reusable by the OS itself.
What causes the major (x2) difference how to avoid it if even possible?
Scenario 1: Loading a scene with heavy mesh and textures content.
Scenario 2: Loading an asset bundle with that scene and the loading the same scene.