Search Unity

Question Loading scene (hot to make) | How to freeze scene

Discussion in 'Editor & General Support' started by xtdiwd, Apr 3, 2022.

  1. xtdiwd


    Jul 25, 2020
    Years ago I had read that in a future version of Unity would have been introduced the possibility to pass to LoadScene a parameter representing a loading scene, to be shown while the real scene was loaded. Maybe I remember wrongly? What happened to this planned feature?

    While waiting for this feature, I tried to manually load a scene and in that one use LoadSceneAsync.
    It works, but it has the defect that the new scene is showed as soon as it is loaded and if the player is reading a tip he might not have had time to read it.
    If I want the player to press a button to switch to the real scene it doesn't work.
    I can use allowSceneActivation but it stops at 90% and then it will take 1000 years for the last 10%, so if pressing the button the player reactivates the loading of the remaining 10% he has to wait again, and that is not nice.

    I tried to solve with LoadSceneMode.Additive but it's ugly because you see both scenes at the same time, in addition the loaded scene is already running.
    Even setting timescale to 0 the scene might still have activity and still seeing both is ugly.

    Assuming the Additive way is the best, how do I stop the loading at 100% and not 90%, or freeze the newly loaded scene without even showing it? Then showing it only when UnloadSceneAsync in the loading scene has finished.

    If possible I would also like to be able to decide if the new scene should be frozen before or after executing all the instructions in Awake and Start, including any non-looping coroutines, which would then be executed without waiting for the new frames.

    I'm using Unity 2020.3.32f1. (the last)