Any plans on making Scene.ActivateAsync or LoadAssetAssync stutterless? From all the testing I’ve done it seems to be purely related to the size of scene or prefab that you load. Doesn’t mater if objects are disabled or without scripts - it will still stutter. making loading in larger worlds without loading screen impossible. The only viable option I’ve found is to split scene into 1000s of prefabs and load them in using addressables + instantiate which is a huge development bottleneck.
No wonder.
When you load or activate a scene or prefab, the components inside run their Awake, OnEnable and Start methods. Whatever code is in there is going to run on the main thread. Even little code can add a significant delay if there are hundreds if not thousands of such components.
You do as you always do when you have performance hiccups: Profile.
I mean LoadAssetAsync stutters without instantiating the objects, purely loading into memory. Same for scene, just mesh renderers without scripts, disabled on start give a stutter. From my understanding it could be made async without stutter. it’s not a mission impossible.

this gives a stutter also, without instantiating the object. depending on a size gameobject. there is some sort of integration part, converting whatever data to unity data I guess and that part is sync, not async.
It’s not that easy because Unity’s API is by and large not thread safe. Some things during the “async” operations still have to run on the main thread.
And what is MeshRenderer if not a component? It is likely going to run some code when loaded or enabled.
Profile, and check if the issue persists in a release build. Whatever happens in the editor may only happen in the editor.
yes I totally understand, but giving some control over it seems more than possible. Other people mentioned that modifying unity’s code on that part helps. but not everybody has access to the source code. So would be great to have some control over it. I can handle asset instantation async, but not the loading part, where the stutter time is equivalent to the size of prefab.
And yes profiler shows internal integration stuff, happens in build. done all the profiling.
Also I believe ECS has stutterless scene streaming. Would be nice to have some of it ported to regular gameobjects. be it much slower, would still be very useful.
I’m having the same issue. Even an empty scene loaded asynchronously causes a stutter when it activates. If the scene only contains mesh renderers (no scripts, objects disabled), I still see the hiccup, and it feels proportional to the number of models.
This also happens in builds, not just in the Editor. I’ve noticed the first time a scene loads it takes significantly longer than subsequent loads. I’m using this approach to stream in smaller points of interest within a ~2000x2000 meter world. These points of interest are just a few houses and props, with no or very few scripts running on Awake, yet the stutter still shows up.
Can confirm that async loading a scene in a BUILD where all root GameObjects were DISABLED in saved scene (so no Awake, Start, etc. happens) still causes stutter.
Application.backgroundLoadingPriority = ThreadPriority.Low;
doesn’t help at all.
Sure, I could use 1000s of separate GameObjects/scenes, but that is just insane - adds an awful workflow to level design and scene interaction in the editor. Cant believe Unity doesn’t have some proper built-in workflow for this.
I did more tests. Ryzen 5900X, 64GB RAM, SSD, RTX 3070, development build, profiler disabled.
Loading a scene with 25,000 DISABLED objects → insane stutter, a few seconds.
Loading a scene with 15,000 DISABLED objects → noticeable stutter.
Loading a scene with 6,300 DISABLED objects → barely noticeable, good.
I would say below 10,000 is manageable, and you should still use time-sliced GameObject activation.
If all previously active GameObjects are disabled from bottom to top before scene loading and then activated from top to bottom frame by frame(can be batched by X count) once the scene is loaded, it can lead to some bugs if certain components disable/enable other GameObjects.
So you should use it carefully - for example, only disable root GameObjects before scene loading and enable root GameObjects frame by frame once the scene is loaded. However, this requires manual scene restructure/modifications to achieve good performance.
To disable scene GameObjects before the scene loads, you can use OnProcessScene(UnityEngine.SceneManagement.Scene scene, BuildReport report) , which allows you to modify scenes before the build and editor playmode.
Unloading scene stutter-free is easy: disable GameObjects from bottom to top, then destroy from bottom to top(both time-sliced).
RAM will not be cleared(meshes, textures, etc) unless Resources.UnloadUnusedAssets() is called.
Addressables can help with ram cleaning.
Another approach is too load all subscenes on start and then disable/enable time-sliced.
Drawbacks: long first loading, RAM usage, code should always sub/unsub in onenable/ondisable etc
upd:
in-editor play OnProcessScene gets called AFTER AWAKE/scene activation
in-editor performance is not important so it can be skipped anyway
build.exe works as expected, because OnProcessScene is called BEFORE build completion
[BuildCallbackVersion(1)]
class SceneBuildProcessor : IProcessSceneWithReport
{
public int callbackOrder => 0;
public void OnProcessScene(UnityEngine.SceneManagement.Scene scene, BuildReport report)
{
// in editor play OnProcessScene gets called AFTER AWAKE/scene activation
if (!BuildPipeline.isBuildingPlayer)
{
return;
}
// logic
}
}