- Home /
Is EditorBuildSettings deprecated?
EditorBuildSettings.scenes gives you a list of the scenes that the user has selected in the Build Settings window. This is a useful value for continuous integration scripts, where you need an array of scene names to pass to BuildPipeline.BuildPlayer.
For example:
string [] scenes = EditorBuildSettings.scenes
.Where (s=> s.enabled)
.Select(s => s.path)
.ToArray();
BuildPipeline.BuildPlayer (scenes, "build/", BuildTarget.StandaloneWindows, BuildOptions.None);
Currently (April 2016, v5.3) EditorBuildSettings is undocumented. It was documented in previous versions, for example here: http://docs.unity3d.com/412/Documentation/ScriptReference/EditorBuildSettings-scenes.html
My question is; has it been formally deprecated? Is there a replacement I should use instead.
Answer by mikelortega · Apr 05, 2016 at 04:36 PM
I think it's deprecated and you should use UnityEditor.SceneManagement.EditorSceneManager
Unity 5.3 introduces the new Multi Scene Editing that's why the old classes are deprecated. Check the Unity 5.3 Upgrade Guide -> Multi Scene Editing