コード例 #1
0
    private static void openWindow()
    {
        // get existing open window or if none, make a new one:
        TestEditorWindow window = (TestEditorWindow)EditorWindow.GetWindow(typeof(TestEditorWindow));

        window.Show();
    }
コード例 #2
0
    public static void ShowWindow()
    {
        //初始化自身
        TestEditorWindow window = GetWindow <TestEditorWindow>("显示窗口");

        window.Show();
    }
コード例 #3
0
    static void Init()
    {
        // Get existing open window or if none, make a new one:
        TestEditorWindow window = (TestEditorWindow)EditorWindow.GetWindow(typeof(TestEditorWindow));

        window.InitTextures();
        window.Show();
    }
コード例 #4
0
    static void OpenWindow()
    {
        TestEditorWindow testEditorWindow =
            (TestEditorWindow)EditorWindow.GetWindowWithRect(typeof(TestEditorWindow), new Rect(0, 0, 500, 500), true,
                                                             "这是一个测试窗口");

        testEditorWindow.Show();
    }
コード例 #5
0
 public override void OnInpectorGUI()
 {
     // Draw the default inspector
     DrawDefaultInspector();
     EditorGUILayout.Space();
     // Add a button for opening the EditorWindow and pass in the reference
     if (GUILayout.Button("Open EditorWindow"))
     {
         TestEditorWindow.ConversationsSystem((Test)target);
     }
 }
コード例 #6
0
 public static void OpenWindow()
 {
     window         = GetWindow <TestEditorWindow>("Test Window");
     window.minSize = new Vector2(320, 150);
     window.maxSize = new Vector2(510, 300);
 }
コード例 #7
0
 private static void Open()
 {
     // 生成
     window         = GetWindow <TestEditorWindow>("テストエディタ");
     window.minSize = new Vector2(800f, 600f);
 }