public override void OnInspectorGUI() { EditorGUI.BeginDisabledGroup(true); EditorGUILayout.PropertyField(this.m_Script); EditorGUI.EndDisabledGroup(); serializedObject.Update(); EditorGUILayout.PropertyField(this.m_WindowName); serializedObject.ApplyModifiedProperties(); if (EditorTools.RightArrowButton(new GUIContent("Bones"), GUILayout.Height(24f))) { if (InventorySystemEditor.Database == null) { InventorySystemEditor.SelectDatabase(delegate { UtilityInstanceWindow.CloseWindow(); ShowBoneMap(); }); } else { ShowBoneMap(); } } if (EditorTools.RightArrowButton(new GUIContent("Items"), GUILayout.Height(24f))) { VisibleItemsEditor.ShowWindow("Items", serializedObject.FindProperty("m_VisibleItems")); } if (EditorWindow.mouseOverWindow != null) { EditorWindow.mouseOverWindow.Repaint(); } }
private void OnEnable() { instance = this; if (database == null) { SelectDatabase(); } ResetChildEditors(); }
public static void ShowWindow() { InventorySystemEditor[] objArray = Resources.FindObjectsOfTypeAll <InventorySystemEditor> (); InventorySystemEditor editor = (objArray.Length <= 0 ? ScriptableObject.CreateInstance <InventorySystemEditor> () : objArray [0]); editor.hideFlags = HideFlags.HideAndDontSave; editor.minSize = new Vector2(690, 300); editor.titleContent = new GUIContent("Inventory System"); editor.SelectDatabase(); }
private void OnDestroy() { if (childEditors != null) { for (int i = 0; i < childEditors.Count; i++) { childEditors[i].OnDestroy(); } } instance = null; }
private static void OpenItemEditor() { InventorySystemEditor.ShowWindow(); }