You can get access to the build order for scenes in your editor scripts by calling EditorBuildSettings.scenes. This allows you to control what scenes are included with the build through your editor code.
public class SceneDump
{
[MenuItem("Codefarts/Dump Scenes")]
public static void Dump()
{
var parts = from part in EditorBuildSettings.scenes
select string.Format("{0} - {1}", part.enabled, part.path);
Debug.Log(string.Join("\r\n", parts.ToArray()));
}
}
