Search Issue Tracker

Won't Fix

Votes

18

Found in

5.5.0b9

Issue ID

845531

Regression

No

Scene Async Load Is Not Async [To be broken into smaller more specific tasks]

Asset Bundles

-

Loading a scene asynchronously doesn't appear to be asynchronous. This has been tested loading a scene with around 10,000 cubes both with textures and without textures. The textures have also been included in their own asset bundle (which was loaded asynchronously) and left to be pulled into the dependency list of the scene bundle.

It doesn't appear to matter if the textures are included in their own asset bundles or not. The time it takes to load the scene is roughly the same each time. However, each time the scene does hang for a second before loading the scene

Reproduction steps:
1) Download the project from one of my comments below.
2) Open project, click Build -> Asset Bundles
3) Play the scene (load_scene if it's not open by default)
4) Click the load button
5) Watch the cube stop for a second before loading the new scene

You can change the textures in Large Textures to have their own asset bundle or not and change the loading code to load or not load the texture asset bundle.

Profiler Spikes:

Textures Included:
Rendering - 27.0ms
Scripts - 34.5 ms

Textures in their own bundle:
Rendering - 27.6ms
Scripts - 33.9ms

EDIT:
Project link:
https://fogbugz.unity3d.com/default.asp?ixAttachment=170688&pg=pgDownload&pgType=pgFile&sFilename=LoadSceneAsync.rar

This is a project I made based on the description since the original project link was dead. The steps should still be the same.

  1. Resolution Note:

    This has been broken into more specific parts that, if are able to work with async loading, should make SceneLoadAsync actually work async.

    https://fogbugz.unity3d.com/f/cases/1096883/
    https://fogbugz.unity3d.com/f/cases/1096884/
    https://fogbugz.unity3d.com/f/cases/1096885/

Comments (7)

  1. kayle1995

    Feb 19, 2022 05:06

    This is a very great post and the way you express your all post details that is too good.thanks for sharing with us this useful post.solelyverified.in

  2. kayle1995

    Feb 19, 2022 05:04

    developer.oculus.com

  3. kayle1995

    Feb 19, 2022 05:02

    It doesn't appear to matter if the textures are included in their own asset bundles or not. The time it takes to load the scene is roughly the same each time. However, each time the scene does hang for a second before loading the scene

  4. shubhamswaraj2021

    Aug 18, 2020 04:47

    good one <a href="https://www.lyricsauto.com">lyricsauto</a>

  5. veronicalim779

    Feb 21, 2020 20:09

    want to play poker, you can visit : https://dinamo77.org

  6. bovesan

    Sep 13, 2018 13:20

    I've been struggling with random crashes on scene loads on iOS this whole week, and my conclusion is this:
    The activation step of LoadSceneAsync is blocking. In the editor, this just causes some lag, but iOS will terminate any thread blocking for more than 5 seconds and the whole application is dead.

    I've tried a few quick solutions, but I am afraid I will have to do a lot of low level work to load a scene gracefully with light data etc.

  7. Robdon

    Jun 07, 2018 13:29

    So, this bug has been around since 2016, and it's just labeled 'Active'.

    When will this be fixed, as currently it basically impossible to Async Load a scene that has any kind of Textures in it?

    As of this comment, it is also a problem if the scene has a TextMeshPro GO in it.

    On my machine the Texture gives you 1 to2, 0.02s spikes, and TextMeshPro gives you about a 0.05s spike.

    Both of these cause visible freezing of the current scene.

    They only way with Unity to truly make a spike free load so that you can animate or display something on loading would be to write your own low-level thread that would load the PNG directly and then create your own texture from there, with Yields in it. Which for a game engine is ridiculously too much time and code.

    Please, can this get fixed.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.