Пример #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();
            }
        }
Пример #2
0
        private void OnEnable()
        {
            instance = this;

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