Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
        private void OnEnable()
        {
            instance = this;

            if (database == null)
            {
                SelectDatabase();
            }
            ResetChildEditors();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
 private void OnDestroy()
 {
     if (childEditors != null)
     {
         for (int i = 0; i < childEditors.Count; i++)
         {
             childEditors[i].OnDestroy();
         }
     }
     instance = null;
 }
Esempio n. 5
0
 private static void OpenItemEditor()
 {
     InventorySystemEditor.ShowWindow();
 }