30
17

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.

Unity Editorのコンパイルが終わった時に音を鳴らす

Last updated at Posted at 2017-10-06

規模が大きくなってソースコードの量が肥大化すると、UnityEditor上でのコンパイル時間が伸びて数秒~数十秒ほど待ち時間が必要になってくることがあります。

このコンパイル待ち時間中にTwitterを見たり他事をして、終わったら音を鳴らして通知してくれるようにしてみました。

#コード

using UnityEditor;

namespace Assets.Editor
{
    [InitializeOnLoad]
    public class CompileFinish
    {
        static CompileFinish()
        {
            if (EditorApplication.isPlayingOrWillChangePlaymode)
                return;

            EditorApplication.delayCall += () => {
                EditorApplication.Beep();
            };

        }
    }
}

このEditor拡張を追加することで、コンパイル終了後にUnityEditorが操作を受け付けるようになったタイミングで1度だけ音が鳴ります。

30
17
1

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
30
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?