コード例 #1
0
        private void Continue()
        {
            while (currentStep < exportSteps.Length)
            {
                ExportStep step     = exportSteps[currentStep];
                float      progress = (float)currentStep / exportSteps.Length;

                EditorUtility.DisplayProgressBar("Exporting", step.message + "...", progress);

                if (!ExecuteStep(step))
                {
                    break;
                }

                currentStep++;

                if (currentStep == exportSteps.Length)
                {
                    ExportComplete?.Invoke();
                }

                if (step.waitForAssemblyReload)
                {
                    return;
                }
            }

            StopExport();
        }
コード例 #2
0
ファイル: ModExporter.cs プロジェクト: spacehamster/ModTool
        private bool ExecuteStep(ExportStep step)
        {
            LogUtility.LogDebug(step.message);

            try
            {
                step.Execute(settings, data);
            }
            catch (Exception e)
            {
                Debug.LogError(step.message + " failed: " + e.Message);
                return(false);
            }

            return(true);
        }