Search Issue Tracker

By Design



Found in


Issue ID




[LoadSceneAsync] allowSceneActivation flag is ignored in Awake()

Scene Management


Repro steps:
1) Open the project and scene Awake in it
2) Play and notice that exception appeared (ERROR ERROR ERROR)
3) Stop and load scene Update
4) Play - notice there is no exception
5) Stop - notice the exception appears

Workaround: Use Start() or Update() to load the scene

Repro in: 5.4.0b1; 5.3.1p1; 5.2.3p3; 5.1.4f1

Comments (20)

  1. 735804c6c0f274699d872bf5550ce296?d=mm


    Jun 15, 2021 18:26

    I have to agree with my fellow devs that came before me. There is no possible way this is "By Design".

    Are you saying when they had the meeting about adding the allowSceneActivation functionality the Lead Engineer said "but let's make it not work if it's invoked in Awake() or similar methods, that will confuse the hell out of the devs muahaha"

    For real, why would it possibly be a design choice to make this feature not work? And don't even bother saying "It's because the scene is then loaded immediately" because, once again, if we wanted the scene to be loaded immediately, we wouldn't be calling "LoadSceneASYNC" with "allowSceneActivation=FALSE".

    The real resolution of this issue report is "Won't Fix". Don't lie to us Unity, you just don't care enough.

    The official documentation states:

    "You should set and use AsyncOperation.allowSceneActivation in coroutine functions. You cannot set and use AsyncOperation.allowSceneActivation within Awake, because this function is not a coroutine."

    How is it you've made a property that only works if it's called from within a coroutine? Why would you use such witchcraft?

  2. B1cb3fd1ca2e6f8a37c71d56ce0a900b?d=mm


    Dec 24, 2020 23:19

    It appears that at the start of your coroutine you must add a
    yield return new WaitForSeconds(.2f);

    This is shown in the documentation.
    However in the documentation its:
    yield return null;

    This no longer works.
    They need to update the documentation because it also uses:

    Which appears to be now obsolete.
    Dont quote me on that, real shallow dive on that one.

  3. 8d6089d4f771439b8b27e4692975ed75?d=mm


    Aug 04, 2020 20:08

    In 2018, you could get around this by starting a coroutine and waiting one tick. This workaround no longer works for 2019.

  4. 5c9e21eefeb8f652abf8953d4e8730b7?d=mm


    Jun 28, 2020 20:08

    It seems to work for me with an IEnumerator Start

    IEnumerator Start()
    yield return new WaitForSeconds(0.2f);

  5. D83e184bf200adb97d8c375f9a70db8b?d=mm


    Jun 17, 2020 19:13

    In unity 2019.4 it's not working AT ALL! Not in Update, Start or in Coroutine. Not fixing a clear bug since 2017 is shameless!

  6. 7a3073409ab6290326509a6172648144?d=mm


    Jun 10, 2020 20:59

    On 2019.3, June 2020, still not working. Tried Start() and Update(). Neither work!

  7. C72216e7cf21f3690aedd50f44ba3f52?d=mm


    May 07, 2020 11:40

    Do you have any updates?

  8. 6b9ac7beff7115aee69165fa78bbbe06?d=mm


    Feb 17, 2020 00:30

    Thanks, wasted quite a bit of time on this design choice.

  9. C652235dd0b662a0ee928c3260710ec5?d=mm


    Dec 20, 2019 09:09

    How is this "By Design"?

  10. 4ae56b6b29cc6e9f4fd631010c4f926b?d=mm


    Jul 24, 2019 19:54

    I'm going to be bumping this, as it appears that the bug is not fixed yet in the editor. I'm using a coroutine to start loading a scene async, but .allowSceneActivation = false is being ignored.

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.