static extern bool GetWindowRect(IntPtr window, ref Window.NativeRect rectangle);
static Rect GetRect(IntPtr handle) { Window.NativeRect rect = new Window.NativeRect(); GetWindowRect(handle, ref rect); return(new UnityEngine.Rect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top)); }