public static EditorWindowView CreateWindow(EditorWindowAsset windowType, bool showReferencePicker = false) { EditorWindowView window = CreateInstance <EditorWindowView>(); window.position = new Rect(HUMEditor.ScreenCenter(new Vector2(400, 400)).position, new Vector2(400, 400)); window.asset = windowType; window.showReferencePicker = showReferencePicker; window.titleContent = new GUIContent("Editor Window View"); return(window); }
public static void Open(Rect position, EditorWindowAsset asset, EditorWindowView view) { EditorWindowVariables window = CreateInstance <EditorWindowVariables>(); window.position = position; window.asset = asset; window.serializedObject = new SerializedObject(asset); window.variablesMetadata = Metadata.FromProperty(window.serializedObject?.FindProperty("variables")); window.view = new SerializedObject(view); window.windowVariablesMetadata = Metadata.FromProperty(window.view.FindProperty("variables")); window.ShowPopup(); }