Search Unity

Scene magically(?) replaced with other scene

Discussion in 'Editor & General Support' started by Trav3l3r, Feb 1, 2016.

  1. Trav3l3r

    Trav3l3r

    Joined:
    Sep 16, 2014
    Posts:
    60
    So I'm working on a platform game and this evening I started working on a new level. I have (or rather, had) already completed one prior to this level which would basically serve as the first level in the game.

    After giving this new level a first play through I noticed something weird happening in the scene hierarchy where somehow level1 and level2 were now merged or joined or something. I didn't recognize the setup and tried switching to the first level, only to find that my first level had been replaced with the contents of level2! Reloading the project didn't help much and it seems I'm now left with two identical scenes. Despite not having saved either scene, especially the first one.

    Setting up a level is a rather lengthy setup with tiles and pickups and creatures and what not, so you can imagine I'm not particularly happy about losing a level. :( Especially because I haven't got a clue what happened. Is it something I did by accident or is it a feature or perhaps a bug? I really would like to know so I can at least try to prevent this from happening again...

    Anyway, if you have some ideas I'd really like to know.
    Thanks

    oh btw, i'm using version 5.3.2f1
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    How do you switch between the levels (code)?
     
  3. Trav3l3r

    Trav3l3r

    Joined:
    Sep 16, 2014
    Posts:
    60
    Thanks for replying!
    This happened while starting the scene in the editor. And there's no level switching at that point on a code level.

    I've gone through the documentation and noticed the new multiscene editing feature. I think that's what happened to my scene as the screenshot looks very similar. The thing is that I don't know how I got myself in this situation nor how both scenes ended up the same.
    I now know you can start 'multi editing' scenes by using the 'open scene additive' option from the context menu, but I'm pretty sure I didn't use that feature.
     

    Attached Files:

  4. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    I am also having this issue where scenes I am not intending to load are loading up. I can start a new scene, and every time I hit play it adds a scene from my project into the hierarchy even though I am not asking it. This is with a blank new scene, light and camera only in the scene. Everytime I hit play the hierarchy has another instance of the scene added to it. This seems like a fairly important bug that was missed. I think it is also affecting my game. After updating to Unity 5.3.2 I also started having this issue as well. Even though I changed nothing, now when a player connects to another players instance(we use Photon), the existing player is sent to the Login scene, which coincidentally is also the scene that keeps copying itself into my hierarchy no matter what scene I am actually working on. This has our project currently broken until we can find a work-around, hence me asking how to simply turn it off heh.

    http://forum.unity3d.com/threads/how-to-disable-multi-scene-editing.386451/
     
  5. Trav3l3r

    Trav3l3r

    Joined:
    Sep 16, 2014
    Posts:
    60
    Thanks for following up on this. I have not been able to reproduce the issue (although i admit I haven't really looked into it that actively). The scene that gave me trouble has been replaced and I make backups more often now.

    Your issue sounds somewhat different than mine though as I was left with to identical scenes. Regardless, I hope your issue can be reproduced/fixed.
     
  6. Sahilgarg369

    Sahilgarg369

    Joined:
    Jun 22, 2016
    Posts:
    5
    Hi Guys,

    Can anyone tell me steps in code wise how to run Editor tests in Play mode. I am getting exception as

    This cannot be used during play mode, please use SceneManager.CreateNewScene() instead.

    Can anyone help me running Editor test cases in play mode.