6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

EditorUtility.DisplayProgressBarでユーザーに処理の進捗度を伝える

6
Posted at

エディタ上で時間のかかる処理をしている時、ユーザーに進捗を伝えるためにはEditorUtility.DisplayProgressBarを使用する。

string title = "処理中";
string info = "進捗の詳細情報";
float progress = 0.7f;

EditorUtility.DisplayProgressBar (title, info, progress);

progress_bar.jpg

進捗度を変更したいときはEditorUtility.DisplayProgressBarを再度呼び直す。

処理が完了したら忘れずにEditorUtility.ClearProgressBarを呼んでダイアログを閉じる。
(閉じるのを忘れていると、エディタの操作ができなくなってしまう)

EditorUtility.ClearProgressBar ();
6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?