Create scene and add to build by script

Hello

I’ve been trying to make a script where I can create custom levels in a game during runtime and then it needs to save the scene and add it to the build “Scenes in Build” by script.

Is it possible to be done aside than doing it manually ?

Am 99% sure it’s not possible to create scenes at runtime. If I was working on this, I think I’d have two completely blank scenes, and then load scene data as asset bundles. I’d use two scenes so I can switch from one to the next.

save scene (editor only)

to add to build

http://docs.unity3d.com/412/Documentation/ScriptReference/EditorBuildSettings-scenes.html