以下の内容はhttps://baba-s.hatenablog.com/entry/2024/04/17/080000より取得しました。


EditorApplication.focusChanged や isFocused でエディタがフォーカスされているか確認できる

EditorApplication.focusChanged の使用例

using UnityEditor;
using UnityEngine;

[InitializeOnLoad]
public static class Example
{
    static Example()
    {
        EditorApplication.focusChanged += isFocused =>
        {
            Debug.Log( isFocused );
        };
    }
}

EditorApplication.isFocused の使用例

using UnityEditor;
using UnityEngine;

[InitializeOnLoad]
public static class Example
{
    static Example()
    {
        EditorApplication.update += () =>
        {
            Debug.Log( EditorApplication.isFocused );
        };
    }
}

参考サイト様




以上の内容はhttps://baba-s.hatenablog.com/entry/2024/04/17/080000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14