Example #1
0
        private void UpdateBuild(ref UploadingBuild build)
        {
            switch (build.status)
            {
            case UploadingBuildStatus.Authorizing:
            case UploadingBuildStatus.Authorized:
                AsyncProgressBar.Display(UploadingBuildsMonitor.s_Content.m_ProgressBarText.text, 0f);
                break;

            case UploadingBuildStatus.Uploading:
            {
                ValueSmoother progressSmoother = this.GetProgressSmoother(build.url);
                progressSmoother.SetTargetValue(build.progress);
                AsyncProgressBar.Display(UploadingBuildsMonitor.s_Content.m_ProgressBarText.text, progressSmoother.GetSmoothValue());
                break;
            }

            case UploadingBuildStatus.Uploaded:
            case UploadingBuildStatus.UploadFailed:
                UploadingBuildsUtility.RemoveUploadingBuild(build.displayName);
                AsyncProgressBar.Clear();
                this.SyncToState();
                break;

            default:
                Debug.LogError("Unhandled enum");
                break;
            }
        }
Example #2
0
        public static void OverwritePrompt(string displayName)
        {
            int num = EditorUtility.DisplayDialogComplex(UploadingBuildsMonitor.s_Content.m_OverwriteDialogHeader.text, UploadingBuildsMonitor.s_Content.m_OverwriteDialogText.text, UploadingBuildsMonitor.s_Content.m_OverwriteDialogButtonOK.text, UploadingBuildsMonitor.s_Content.m_OverwriteDialogButtonCancel.text, UploadingBuildsMonitor.s_Content.m_OverwriteDialogButtonVersion.text);

            if (num == 1)
            {
                UploadingBuildsUtility.RemoveUploadingBuild(displayName);
                AsyncProgressBar.Clear();
                UploadingBuildsMonitor.s_UploadingBuildsMonitor.SyncToState();
            }
            else
            {
                UploadingBuildsUtility.ResumeBuildUpload(displayName, num == 0);
            }
        }