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. Response avatar

    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 (5)

  1. 36c65e3934745df83910152c6a077e4a?d=mm

    shubhamswaraj2021

    Aug 18, 2020 04:47

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

  2. 0a079a1d26a0095c8f23559a2272691d?d=mm

    AlfredThurston

    May 04, 2020 14:47

    Unity is the most popular and frequently used platform for developers who like to develop video games. They can make the video games online here and sale on play store easily. Thanks for the <a href="https://www.topdissertations.org/bestdissertation-review/">best dissertation writing service</a> update on your blog these are just fantastic.

  3. 8187a8afffc5a0368160d68b6cf7c559?d=mm

    veronicalim779

    Feb 21, 2020 20:09

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

  4. E99a269c582998b6645ecdd7a02ccdd5?d=mm

    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.

  5. 4b7de6d36068f703fc18475853caf1bf?d=mm

    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.