Пример #1
0
    void StartEntry(Entry entry)
    {
        int standaloneCount = entry.count;

        if (!Application.isPlaying && entry.runInEditor)
        {
            //EditorLevelManager.StartGameInEditor(args);
            standaloneCount--;
        }

        for (var i = 0; i < standaloneCount; i++)
        {
            BuildUtils.RunBuild(entry.name);
        }
    }
Пример #2
0
    void DrawBuild()
    {
        // Title
        GUILayout.Label("Build", EditorStyles.boldLabel);

        // Build Times
        GUILayout.Label("Build times:");
        string serverStr = PrettyPrintTimeStamp(TimeLastBuildGame(GameLoopMode.Server));
        string clientStr = PrettyPrintTimeStamp(TimeLastBuildGame(GameLoopMode.Client));
        string aiStr     = PrettyPrintTimeStamp(TimeLastBuildGame(GameLoopMode.AI));

        GUILayout.BeginHorizontal();
        {
            GUILayout.Space(20);
            GUILayout.Label("- Build Time Server", GUILayout.Width(130));
            EditorGUILayout.SelectableLabel(serverStr, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight));
        }
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        {
            GUILayout.Space(20);
            GUILayout.Label("- Build Time Client", GUILayout.Width(130));
            EditorGUILayout.SelectableLabel(clientStr, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight));
        }
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        {
            GUILayout.Space(20);
            GUILayout.Label("- Build Time AI Client", GUILayout.Width(130));
            EditorGUILayout.SelectableLabel(aiStr, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight));
        }
        GUILayout.EndHorizontal();

        if (GUILayout.Button("Open Builds Folder"))
        {
            BuildUtils.RunBuild(BuildUtils.GameLoopMode.Undefined);
            GUIUtility.ExitGUI();
        }

        // Build All
        GUILayout.Label("Rebuild S.Alone", EditorStyles.boldLabel);
        GUILayout.BeginVertical(EditorStyles.textArea);

        GUILayout.BeginHorizontal();
        GUILayout.Label("Build All", GUILayout.ExpandWidth(true));
        GUILayout.BeginHorizontal(GUILayout.Width(100));
        if (GUILayout.Button("Build"))
        {
            BuildServer();
            BuildClient();
            BuildAI();
            GUIUtility.ExitGUI();
        }

        GUILayout.EndHorizontal();
        GUILayout.EndHorizontal();

        // Build AI Server
        GUILayout.BeginHorizontal();
        GUILayout.Label("Build Server", GUILayout.ExpandWidth(true));
        GUILayout.BeginHorizontal(GUILayout.Width(100));
        if (GUILayout.Button("Build"))
        {
            BuildServer();
            GUIUtility.ExitGUI();
        }

        GUILayout.EndHorizontal();
        GUILayout.EndHorizontal();

        // Build Client
        GUILayout.BeginHorizontal();
        GUILayout.Label("Build Client", GUILayout.ExpandWidth(true));
        GUILayout.BeginHorizontal(GUILayout.Width(100));
        if (GUILayout.Button("Build"))
        {
            BuildClient();
            GUIUtility.ExitGUI();
        }

        GUILayout.EndHorizontal();
        GUILayout.EndHorizontal();

        // Build AI Client
        GUILayout.BeginHorizontal();
        GUILayout.Label("Build AI Client", GUILayout.ExpandWidth(true));
        GUILayout.BeginHorizontal(GUILayout.Width(100));
        if (GUILayout.Button("Build"))
        {
            BuildAI();
            GUIUtility.ExitGUI();
        }

        GUILayout.EndHorizontal();
        GUILayout.EndHorizontal();

        GUILayout.EndVertical();
    }