Save scene

Hey, im using:

EditorApplication.SaveScene("maps/", true);

and if i play in playmode (in Unity Editor without build), unity call me:

"InvalidOperationException: This cannot be used during play mode."

I created map editor and i need create scenes (missions and custom maps) and save it als unity scene file (.unity). Its possible any way?

You’re instinct is correct, it is not possible to save a scene externally to the UnityEditor. You can create an empty scene at run-time and then instantiate game objects in that scene.