Search Issue Tracker

Fixed in 2017.2.0f3

Votes

21

Found in

5.3.1p4

Issue ID

764048

Regression

No

Scene is not considered loaded when Awake() is called

Scene/Game View

-

Scene is still going to be considered as not loaded during awake but from now on it's going to be possible to call GetRootGameObjects in Awake.

To reproduce:
1. Open attached project
2. Open "BugScene" scene
3. Play the scene

Actual behavior: error "ArgumentException: The scene is not loaded." in the Console

Comments (7)

  1. 11ecd0917370399f321cac0f105f8800?d=mm

    Bladdock

    May 01, 2020 10:20

    Sorry, to clarify: I'm experiencing the specific issue GUNEYOZSAN mentions in the comment preceding mine, that calls to EditorSceneManager.MarkSceneDirty do not work from Awake when the scene is loaded.

  2. 11ecd0917370399f321cac0f105f8800?d=mm

    Bladdock

    May 01, 2020 10:18

    Experiencing this issue again in 2019.3.7f1. I managed to work around it by using EdtiorApplication.delayCall and doing everything in the callback. Hopefully that's helpful to anyone hitting this page.

  3. 19bcab4c25eb264b21619cd7a8a15481?d=mm

    guneyozsan

    Sep 08, 2018 21:00

    Coming from the topic "calling MarkSceneDirty from Awake does not mark scene as dirty". If related, the dirty scene problem is now reappeared on 2018.2.6f1.

  4. F90e0ad1d1b264ee38f98e3edcd34836?d=mm

    sanmn19

    Feb 15, 2017 15:43

    This happens when I call from SceneManager.sceneLoaded callback as well. Please fix this ASAP.

  5. A2d874b7d26aaea63c349ce4da3e9e83?d=mm

    jmenossi

    Aug 08, 2016 23:31

    In Unity 5.4.0f3 I get the same error when trying to merge scenes in the SceneManager.sceneLoaded event....
    Apparently, "scene loaded" does not mean "scene loaded" :-/

  6. 3053fbb3cc4ff1ff2ce5a86eac016058?d=mm

    Chronogeran

    Jun 08, 2016 03:00

    Ran into this while trying to merge a scene from an Awake() in that scene.

  7. D4dcac05cf19458049fe4828f3e88e60?d=mm

    brussow92

    Feb 02, 2016 15:34

    I Have the same Error when i use the method "OnLevelWasLoaded" and i try to use "_scene.GetRootGameObjects();"

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.