Search Unity

UnloadSceneAsync() not working - could use some assistance!

Discussion in 'Scripting' started by MrLucid72, May 8, 2019.

  1. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    996
    I have scene "A" and "B".

    I want to change scene "B" to "C".

    So I additively add "C" async while unloading "B" async (during a loading screen while scenes are swapping out, handled by "A").

    "C" loads fine. However, "B" does not unload: The progress does not even go beyond 0% (where, if it did, I would use Resources.UnloadUnusedAssets() after).

    Any general reason why unloading "B" isn't working? There's definitely 1 scene still there (A), so it should (by the books) work.

    EDIT: I'm progressing, narrowing down the cause. Something to do with the active scene, I think.
    EDIT 2: Nope, it doesn't matter about active scene. It works AFTER I activate (not to be confused with set active) a preloaded scene. Maybe you can't have 2 asyncOps going at the same time for scenes? I can't unload "B" and load "C" at the same time, even if "A" exists, which defeats the purpose of async a bit. Either dumb design or a bug.
     
    Last edited: May 9, 2019