Hello!
We’re working on optimizing asset loading in our Unreal Engine (5.6.1) scenes for an animated feature film.
We’re using persistent levels (not world partition) per sequence, with environments added as sublevels.
By default, we hide all sublevels in the Persistent Level (PER) and show only the ones needed from shots sequencer.
However, we’ve observed (using the Statistics tool and “rhi.dumpresourcememory all” command) that even hidden sublevels load many assets when opening the PER in the editor — notably static meshes and textures (though textures are streamed at low resolution, 64x64, so they’re not too heavy when not needed).
We initially suspected hard references in our Blueprints (static meshes directly assigned to components) and switched to soft references with dynamic loading/assignment in construction scripts.
But the assets still load.
Because the sublevels are in “Blueprint” mode, they won’t be loaded if not explicitly told so when in MRQ. But this does not apply to the editor it seems.
Further investigation of the ASCII version of a .umap file revealed that the level asset stores references to all actors and their components’ current assigned values — even for soft references set dynamically.
[Image Removed]
In our workflow, this pre-loading isn’t helpful, as we want assets loaded only when explicitly needed.
This behavior can also load assets that won’t be used, even when the sublevel is shown, because the level stores the current value at time T, but maybe the asset will be updated later with other data and the level won’t be re-saved and will keep a reference to an old data.
For example, if a Blueprint chooses a mesh based on another asset’s data (like our example BP_DA), the saved level might reference an old mesh (e.g., StaticMeshA), but runtime logic assigns a new one (e.g., StaticMeshB). This results in StaticMeshA being loaded unnecessarily.
Attached is a sample project reproducing this behavior, see “Steps to Reproduce” section.
Questions:
- Why are meshes and textures loaded before the actors using them are even constructed?
- What’s the reason behind this editor-specific behavior?
- Do you have recommendations for limiting pre-loaded data in the editor?
- Can we maybe disable this pre-loading or remove asset references from the level file?
Thanks a lot!
Maxime
[Attachment Removed]