Want to change scenes additively in editor, using scripting.

The unity UI lets you right click on a scene and choose “Open Scene Additive”.

I want to do this in a script in the EDITOR. I try this in the Update() method of one of my MonoBehaviors:

     EditorSceneManager.LoadScene("MyAdditiveScene", LoadSceneMode.Additive);

And I get:

InvalidOperationException: This can
only be used during play mode, please
use EditorSceneManager.OpenScene()
(System.String sceneName,
LoadSceneMode mode) (at

Of course, the OpenScene() method doesn’t have option for Additive flag.

How does Unity do this?


 Application.LoadLevel (<Scene Name>);