示例#1
0
        internal static void Show(out Action <string> addTextAction, out Action close)
        {
            CodeDocsInfoPopup window =
                (CodeDocsInfoPopup)GetWindow(typeof(CodeDocsInfoPopup), true, "Generating docs...");

            window.minSize = new Vector2(600, 400);
            addTextAction  = window.AddText;
            close          = window.Close;
            window.Show();
        }
示例#2
0
        public static void GenerateAndOpenDocs()
        {
            if (CodeDocsSettings.IsProperlyConfigured() == false)
            {
                CodeDocsSettings.ShowConfiguration();
                return;
            }

            _shouldClosePopup = false;
            Process generateProcess = StartCommand(CodeDocsSettings.GenerateDocsExe, PlayerSettings.productName,
                                                   CodeDocsSettings.SourcesPath);

            CodeDocsInfoPopup.Show(out _updateTextAction, out _closePopup);

            EditorApplication.update += Update;
            new Thread(() =>
            {
                Log(LogType.Log, "thread started");

                if (generateProcess == null)
                {
                    Log(LogType.Error, "Could not start generate process");
                    _shouldClosePopup = true;
                    return;
                }

                Log(LogType.Log, "waiting for thread to finish");
                generateProcess.WaitForExit();

                Log(LogType.Log, "process finished");
                if (generateProcess.ExitCode == 0)
                {
                    EditorApplication.delayCall += OpenDocs;
                }

                _shouldClosePopup = true;
            }).Start();
        }