Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Is Multi-Scene Editing supposed to actually work?

Discussion in '5.3 Beta' started by makeshiftwings, Oct 21, 2015.

  1. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I see there are now options for "Load Scene Additively" and the release notes mention Multi Scene Editing, but any time I've tried to do even the simplest thing it throws a ton of errors, duplicates objects, and usually crashes. Do you want us actually testing this as if it were a real feature or is this sort of a "in theory it's there but don't actually touch it yet" feature?
     
  2. deram_scholzara

    deram_scholzara

    Joined:
    Aug 26, 2005
    Posts:
    1,043
    It's a real, and much anticipated, feature.
     
  3. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Does it work at all for you? I've noticed several things that make it unusable:

    1) If you add a new scene and open it additively, you get a bunch of console errors about duplicated game managers
    2) If you enter play mode after opening a scene additively, it duplicates all objects in both scenes
    3) Tends to crash after a few minutes if doing anything with two scenes open
     
  4. Deleted User

    Deleted User

    Guest

    Could you please create a bug for those issues with repro project? Thanks.
     
  5. Deleted User

    Deleted User

    Guest

    Hello! I've just upgraded my project to 5.3b5 and I'm really puzzled by this new multi scene editing feature. How is it supposed to work exactly? My project is quite simple and made use of Application.LoadLevel to switch from one level to another. I've replaced those function calls by the new "SceneManager.LoadScene" functions and got really strange errors (that finally disappeared !?) and in the hierarchy tab, each time I hit play, I get a growing list of scenes (see attached screenshot). Am I doing something wrong? Is it a bug?
     

    Attached Files:

  6. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Could you please file a bug report and attach your project so we can have a look at what it going on.
    It is hard to tell if it is a bug or some unintended usage of the API that causes this.

    Cheers
    Steen


     
  7. Deleted User

    Deleted User

    Guest

    I can't send that project, it's too big. So, for now as I'm a newbie programmer, I'll assume that something wrong hidden in my scripts is causing that.
    But I have another newbie question. How can I get the current scene name? With the previous api I could use Application.loadedLevelName but I can't find the equivalent with the new scene manager. I found Scene.name but I don't know how to make it work. Can you help me on this? Thanks!
     
  8. deram_scholzara

    deram_scholzara

    Joined:
    Aug 26, 2005
    Posts:
    1,043
    Keep track of the scene name yourself using a static variable that you set equal to the level name just before loading it. The old setup didn't update loadedLevelName when additively loading levels, only when doing a regular LoadLevel - so if you want to track additively loaded levels, that's another reason to set up your own variable.
     
  9. Deleted User

    Deleted User

    Guest

    Ok, but i think it's a regression. Application.loadedLevelName is really convenient and less error-prone.
     
  10. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    SceneManager.GetActiveScene().name will give you the name of the active scene.
    If you have more than one scene loaded loop over the scenes
    Code (csharp):
    1.  
    2. for (int i = 0; i < SceneManager.sceneCount; ++i)
    3. Debug.Log( SceneManager.GetSceneAt(i).name);
    4.  
     
  11. Deleted User

    Deleted User

    Guest

    Thanks. But is SceneManager.GetActiveScene().name supposed to be available in the current beta (b5)?
     
  12. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    If it is not, then beta 6. It was moved from EditorSceneManager to the runtime SceneManager where it makes much more sense to have it
     
  13. waqaswaqas

    waqaswaqas

    Joined:
    Mar 13, 2015
    Posts:
    7
    Hey Steen
    Using UnityEngine;
    SceneManager is not recognizing in script ......
    unless I do this
    UnityEngine.SceneManagement.SceneManager.GetActiveScene().name
    am I doing something wrong ?
     
  14. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    You need 'using UnityEngine.SceneManagement;' not just 'using UnityEngine.'
     
    waqaswaqas likes this.