コード例 #1
0
 /// <summary>
 /// Show progress bar with zero progress.
 /// </summary>
 /// <param name="title">Title of progress bar</param>
 /// <param name="OnCancel">Invoked if user canceled operation</param>
 public static void Show(string title, Action OnCancel = null)
 {
     _title    = title;
     _progress = 0f;
     _onCancel = OnCancel;
     Update(_FIRST_STATUS);
     if (_closed)
     {
         _closed = false;
         MainThreadCallback.Push(UpdateProgress());
     }
 }
コード例 #2
0
        private void HandleExitedAsync()
        {
            bool success = false;

            try {
                HandleExited(_outputAsync.ToString(), _errorsAsync.ToString());
                success = !_isAborted;
            } catch (Exception e) {
                UnityEngine.Debug.LogError(e);
            } finally {
                if (_onExited != null)
                {
                    MainThreadCallback.Push(() => _onExited(success));
                }
            }
        }
コード例 #3
0
 /// <summary>
 /// Close progress bar
 /// </summary>
 public static void Close()
 {
     _closed = true;
     MainThreadCallback.Push(EditorUtility.ClearProgressBar);
 }