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


【Unity】Console ウィンドウの検索欄に文字列を設定するエディタ拡張

ソースコード

using System.Reflection;
using UnityEditor;

public static class Example
{
    [MenuItem( "Tools/Hoge" )]
    private static void Hoge()
    {
        var assembly      = typeof( Editor ).Assembly;
        var type          = assembly.GetType( "UnityEditor.ConsoleWindow" );
        var consoleWindow = EditorWindow.GetWindow( type );
        var methodInfo    = type.GetMethod( "SetFilter", BindingFlags.Instance | BindingFlags.NonPublic );

        methodInfo.Invoke( consoleWindow, new object[] { "ピカチュウ" } );
    }
}

参考サイト様




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

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