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


【Unity】EditorWindow で UIElements を構築するスクリプトを書く場合は CreateGUI 関数を使用する

概要

CreateGUI is called when the EditorWindow's rootVisualElement is ready to be populated.

CreateGUI 関数は EditorWindow の rootVisualElement が
操作できるようになるタイミングで呼び出される

using UnityEditor;
using UnityEngine.UIElements;

public class Example : EditorWindow
{
    [MenuItem( "Tools/Hoge" )]
    private static void Open()
    {
        GetWindow<Example>();
    }

    private void CreateGUI()
    {
        rootVisualElement.Add( new Label( "ピカチュウ" ) );
    }
}

参考サイト様




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

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