unity3d ~黑科技~ 打開一個無邊框窗體

直接上圖
圖片描述this

using UnityEngine;
using UnityEditor;
using System.Collections;

public class L004Window : EditorWindow
{
    static L004Window instance = null;

    public static void OpenWindow()
    {
        if (instance == null)
        {
            instance = (L004Window)ScriptableObject.CreateInstance<L004Window>();
            instance.position = new Rect(500, 300, 600, 400);
        }
        instance.ShowPopup();
        instance.Focus();
    }

    void Update()
    {
        if (EditorWindow.focusedWindow != this) this.Close();
    }
}
相關文章
相關標籤/搜索