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

  1. AlrexX1

    Jan 22, 2023 12:52

    If it helps anyone, I've found that waiting a frame (yield return null;) before setting allowSceneActivation within a coroutine should work fine. Still baffling that they marked this as "by design"...

  2. Denis-535

    Dec 08, 2022 11:25

    How it could be by design?
    Do you understand that you are mocking us?

  3. _FLX

    Oct 29, 2022 07:08

    Bad joke.
    How can you break something so basic and essential ?

    It looks like you're actively trying to get indies away from unity, again and again and again

  4. rex1313

    Apr 16, 2022 06:44

    This is so funny. Yet again I faced an issue with so basic functionality believing I don't understand something because yet again I couldn't believe such basic stuff can be broken. Then yet again I found this page, where the issue really exists, and yet again has the status "Won't fix". Of course, in order to make it work somehow, we need to apply so dirty workaround (delay in this case).
    Honestly, I chose Unity for my first game because I thought it will be easier to do it here (C# vs C++ in competition), but man... How many hours and days do I spend resolving issues like this? How much money I spend in Asset Store because built-in solution just don't work good enough. Then how much hours I spent on writing custom tools for making basic stuff that it is just built in in competitor.
    I can't wait till finishing my first game - its too far in development to move it somewhere else - so I don't have to see this engine anymore.

  5. Ramlock

    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?

  6. Madgineer

    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.

  7. sbsmith

    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.

  8. Tibor-Udvari

    Jun 28, 2020 20:08

    It seems to work for me with an IEnumerator Start

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

  9. Hex0dus

    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!

  10. unity_SRZXyHN7P3fFcA

    Jun 10, 2020 20:59

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

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.