public static void MenuTreeViewEditor() { var editor = EditorWindow.GetWindow(typeof(iCS_TreeViewEditorWindow), false, "Tree View"); EditorWindow.DontDestroyOnLoad(editor); editor.hideFlags = HideFlags.DontSave; }
public static void MenuLibraryEditor() { // -- Adjust default size when first opened -- // -- Adjust default size when first opened -- var width = 1280f; var height = 800f; var r = new Rect(0.2f * width, 0.2f * height, 0.2f * width, 0.6f * height); var editor = EditorWindow.GetWindowWithRect(typeof(iCS_LibraryEditorWindow), r, false, "Library"); editor.maxSize = new Vector2(5120f, 2880f); editor.minSize = new Vector2(50f, 50f); EditorWindow.DontDestroyOnLoad(editor); editor.hideFlags = HideFlags.DontSave; }