예제 #1
0
파일: AutoBuilder.cs 프로젝트: bsimser/CoM
    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);
    }
예제 #2
0
    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);
        }
    }