public static void OpenWindow() { if (EditorApplication.isPlaying) { Debug.Log("You can't change Options Menu Designer runtime!"); return; } window = (TPOptionsDesigner)GetWindow(typeof(TPOptionsDesigner)); currentScene = EditorSceneManager.GetActiveScene().name; EditorApplication.hierarchyWindowChanged += hierarchyWindowChanged; window.minSize = new Vector2(615, 290); window.maxSize = new Vector2(615, 290); window.Show(); }
public void OpenCreator() { if (TPOptionsCreator.DebugMode) { if (serializedObject.targetObject.hideFlags != HideFlags.NotEditable) { serializedObject.targetObject.hideFlags = HideFlags.NotEditable; } return; } if (serializedObject.targetObject.hideFlags != HideFlags.None) { serializedObject.targetObject.hideFlags = HideFlags.None; } if (GUILayout.Button("Open Menu Manager", GUILayout.Height(30))) { TPOptionsDesigner.OpenWindow(); } }