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?
It’s a real, and much anticipated, feature.
Does it work at all for you? I’ve noticed several things that make it unusable:
- If you add a new scene and open it additively, you get a bunch of console errors about duplicated game managers
- If you enter play mode after opening a scene additively, it duplicates all objects in both scenes
- Tends to crash after a few minutes if doing anything with two scenes open
Could you please create a bug for those issues with repro project? Thanks.
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?
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
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!
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.
Ok, but i think it’s a regression. Application.loadedLevelName is really convenient and less error-prone.
SceneManager.GetActiveScene().name will give you the name of the active scene.
If you have more than one scene loaded loop over the scenes
for (int i = 0; i < SceneManager.sceneCount; ++i)
Debug.Log( SceneManager.GetSceneAt(i).name);
Thanks. But is SceneManager.GetActiveScene().name supposed to be available in the current beta (b5)?
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
Hey Steen
Using UnityEngine;
SceneManager is not recognizing in script …
unless I do this
UnityEngine.SceneManagement.SceneManager.GetActiveScene().name
am I doing something wrong ?
You need ‘using UnityEngine.SceneManagement;’ not just ‘using UnityEngine.’
