/// <summary> /// Hide this instance. /// </summary> public static void Hide() { if (window != null) { window.Close(); window = null; } }
/// <summary> /// Open the specified pos. /// </summary> public static void Open() { float width = 860; float height = Screen.currentResolution.height - 100; float x = Screen.currentResolution.width - width; float y = 25; Rect size = new Rect(x, y, width, height); if (window == null) { window = (AreaEventDatasEditorWindow)EditorWindow.GetWindowWithRect(typeof(AreaEventDatasEditorWindow), size, true, "大地图事件编辑器"); } window.Show(); window.position = size; if (Prefab != null) { DestroyImmediate(Prefab); Prefab = null; } Prefab = new GameObject(); Prefab.name = "pointer"; Prefab.transform.position = Vector3.zero; }