Search Unity

Almost all GameObjects disappear from Scene and other Scene issues.

Discussion in 'Editor & General Support' started by Tuonela93, Jul 10, 2019.

  1. Tuonela93

    Tuonela93

    Joined:
    Apr 7, 2018
    Posts:
    27
    Around three weeks ago I started encountering very weird problems in my scenes. One of these issues is extremely grave. I don't know if these are all related, but fixing the first one is my main goal at the moment.

    1- Randomly, all GameObjects in one of my loaded scenes will disappear (around 1-3 times a day), except two to four that are kept. It seems to be random which ones are kept, mostly EventSystem is in there but might be also a GO made by me. If I notice this and remove and readd scene from the assets, all is good. If I don't notice it and save the scene, game over. Now I have a destroyed scene. This has cost me couple of days of work, now I am very paranoid and try to back up my scenes constantly.

    2- Sometimes when unloading a scene, Unity will ask to save the changes, even though there are no changes to the scene. If I save, and then load and unload immediately, Unity will again seemingly detect some non-existing changes and ask the same question.

    3- Unity will sometimes ignore allowSceneActivation boolean and will load a scene even though the flag is set to false. I am 100% sure the code is correct here, as it used to work correctly , and still does most of the time.

    I wanted to also ask if any one is encountering similar issues, or has any possible solutions.

    EDIT: The problem 3 seems to happen when my third scene gets loaded in runtime, I quit play mode while in the third scene, and then enter play mode again. While switching from my first scene (loading screen) to second scene (my main game) now it won't wait for allowSceneActivation to be set to true (btw while switching from scene 2 to 3 I don't set allowSceneActivation to false, just straight up load the scene). This is annoying because game will skip the loading step and makes it very hard to test for changes that have happened in Scene 3.


    EDIT: Currently using version 2019.1.8f1.
     
    Last edited: Jul 11, 2019
  2. Tuonela93

    Tuonela93

    Joined:
    Apr 7, 2018
    Posts:
    27
    These are the errors I get in the debug log when issue no 1 happens, seems like more than a hundred of these. This is what the editor logs look like:

    Failed to unpersist: CircleCollider2D ID: -133844 FileID: 1984082079
    (Filename: C:\buildslave\unity\build\Runtime/Misc/SaveAndLoadHelper.cpp Line: 641)
    Failed to unpersist: SpriteRenderer ID: -133842 FileID: 1984082080
    (Filename: C:\buildslave\unity\build\Runtime/Misc/SaveAndLoadHelper.cpp Line: 641)
    Failed to unpersist: GameObject ID: -133840 FileID: 1984082078
    (Filename: C:\buildslave\unity\build\Runtime/Misc/SaveAndLoadHelper.cpp Line: 641)
    Failed to unpersist: CircleCollider2D ID: -133838 FileID: 1739267588
    (Filename: C:\buildslave\unity\build\Runtime/Misc/SaveAndLoadHelper.cpp Line: 641)

    .......
     
  3. KMacro

    KMacro

    Joined:
    Jan 7, 2019
    Posts:
    48
    I am also experiencing the first problem, however it is normally just one object which is being deleted, usually the newest one in the scene that I am currently tinkering with. I also find that it seems to happen mostly when exiting play mode.
    This problem is at best a serious waste of time and at worst a complete show stopper. Any suggestions?
     
  4. Tuonela93

    Tuonela93

    Joined:
    Apr 7, 2018
    Posts:
    27
    The problem now only happens when I have to scenes loaded at the same time when I push play (Cannot remember now if this was the case in the beginning also). It will happen in those cases like 75% of the time. So if I do that by accident I need to remove the scene and then readd it, and all is good.
     
  5. zeiksz

    zeiksz

    Joined:
    Mar 10, 2019
    Posts:
    10
    I started to have this problem with a brand new project too. Freshly started, using very few assets: script inspector 3, odin, ultimate editor enhancer. 2022.1.4f1. Having this and package manager loggin out as random editor crap to annoy me. Problem is pretty random, could not find cause so far. Trying to remove assets, tho' I used all of them so far, so it may be an editor setting, etc. too.