概要
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( "ピカチュウ" ) ); } }