- Home /
AsyncOperation for SceneManager.LoadSceneAsync doesn't adhere to Application.backgroundLoadingPriority
I'm loading levels with:
AsyncOperation async = SceneManager.LoadSceneAsync()
I've set background loading priority via:
Application.backgroundLoadingPriority = ThreadPriority.Low;
According to https://docs.unity3d.com/ScriptReference/Application-backgroundLoadingPriority.html, setting ThreadPriority.Low - 2ms "This is a maximum time all asynchronous operations can spend within a single frame on a main thread."
However, I'm seeing huge performance hits when scenes are loading.. here we see 123ms spent loading:
Any clues why this AsyncOperation is not following backgroundLoadingPriority? Or how to REALLY load the scene asynchronously without the performance hit?
Answer by Helbold · Dec 30, 2016 at 09:22 AM
AsyncOpertion.priority does not take the ThreadPriority enum
The load/unload Scene thread is always high priority, all you can do is change which SceneLoad-job may be executed first. The default value is 0 and any higher value will equal a higher priority.
Your answer
Follow this Question
Related Questions
issue with create texture2d in background Task, probably a bug ? 0 Answers
Modify Scene origin before loading scene? Or LoadLevelAdditive @ certain world position 0 Answers
How to use AsyncOperation.completed? 1 Answer
Load Level Additive Async Lag spike 0 Answers
Two async operations at the same time not working ? why ? 0 Answers