private static void BuildToTarget(string path, BuildTarget target, bool isDevelopment = false) { bool needsPreloader = (target == BuildTarget.WebGL && preloaderEnabled); var scenes = needsPreloader ? preloaderScenes : singleScene; DungeonBuilder.ClearAll(); BuildPipeline.BuildPlayer(scenes, path, target, isDevelopment ? BuildOptions.Development : BuildOptions.None); }
public override void OnInspectorGUI() { DrawDefaultInspector(); DungeonBuilder script = (DungeonBuilder)target; bool isInitialized = script.IsInitialized; GUI.enabled = isInitialized; script.BuildMethod = (DungeonBuildMethod)EditorGUILayout.EnumPopup(script.BuildMethod); if (GUILayout.Button("Rebuild Map")) { script.RebuildSelectedMap(); } if (GUILayout.Button("Rebuild Dungeon")) { script.RebuildDungeon(); } GUI.enabled = true; if (!isInitialized) { GUILayout.Label("You must initialize before rebuilding."); } if (GUILayout.Button("Initialize")) { script.Initialize(); } if (GUILayout.Button("Clear")) { DungeonBuilder.ClearAll(); } GUILayout.Label("Active Level:"); if (isInitialized) { script.SelectedMap = EditorGUILayout.IntSlider(script.SelectedMap, 0, script.Maps); } }