private void OnEnable()
 {
     instance = this;
     if (database == null)
     {
         SelectDatabase();
     }
     ResetChildEditors();
 }
        public static void ShowWindow()
        {
            StatSystemEditor[] objArray = Resources.FindObjectsOfTypeAll <StatSystemEditor>();
            StatSystemEditor   editor   = (objArray.Length <= 0 ? ScriptableObject.CreateInstance <StatSystemEditor>() : objArray[0]);

            editor.hideFlags    = HideFlags.HideAndDontSave;
            editor.minSize      = new Vector2(690, 300);
            editor.titleContent = new GUIContent("Stat System");
            editor.SelectDatabase();
        }
 private void OnDestroy()
 {
     if (childEditors != null)
     {
         for (int i = 0; i < childEditors.Count; i++)
         {
             childEditors[i].OnDestroy();
         }
     }
     instance = null;
     db       = null;
 }
Пример #4
0
 private static void OpenItemEditor()
 {
     StatSystemEditor.ShowWindow();
 }