Esempio n. 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();
        }
Esempio n. 2
0
        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);
        }