public static void Launch(VariablesEditor editor, ReorderableList list) { if (instance == null) { instance = CreateInstance <AddVariableWindow>(); } instance.titleContent = new GUIContent("Add Variable"); instance.list = list; instance.editor = editor; instance.ShowUtility(); instance.Focus(); var size = new Vector2(200, 110); instance.minSize = size; instance.maxSize = size; var rect = instance.position; rect.size = size; rect.center = GUIUtility.GUIToScreenPoint(XEvent.MousePos); instance.position = rect; }
void OnAdd(ReorderableList list) { AddVariableWindow.Launch(this, list); }