Hello,
Performing one specific scene transition in my game gives me a very long load time. I have 5 scenes total, and this is the only scene transition where this happens.
It does not seem like it takes a very long time for it to load when I start directly from that scene in Unity, but when I start from another scene then interact with the door to go to the next scene, it takes a long time to load.
I went into profiler and found that 39% comes from ActionListAutosaving.OnUpdate(). Please see the screenshot below for the further breakdown:
The remaining 60ish% comes from Application.UpdateScene and seems to hang on Gfx.WaitForPresentOnGfxThread. Screenshot below for this breakdown. I am not sure if that is relevant at all, just trying to provide all info I can.
Troubleshooting taken so far that did not resolve the issue - changed actionlist autosave interval to 0, and disabled async loading.
This long load time occurs specifically in this scene in both the editor version and actual builds of the game, but seems to be worse in the actual build.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
What are your AC/Unity versions, and does this occur when transitioning to the scene for the first time, or only other times?
Also, does this occur when transitioning from a fresh AC scene to the problematic scene?
Thanks for the details. Reducing the autosave interval to 0 should prevent this - and it'll only have an impact in the Editor. The code is not run at all in builds.
I don't see AC being referenced directly in the Profiler's Hierarchy - is there anything specific about the scene in question that makes it stand out from the others?
Try disabling groups GameObjects in the scene until the issue disappears, to see if that helps to pindown a particular GameObject as the cause.
There are a few things that people suggest as the cause of Gfx.WaitForPresentOnGfxThread instances, including the one here. This is more of a general Unity solution, but if we can isolate AC as being a factor I can suggest a more AC-specific solution.