Beispiel #1
0
        public override void OnGUI(DatabaseEditor ed)
        {
            base.OnGUI(ed);
            EditorGUILayout.BeginHorizontal();
            {
                selected = XXToolsEdGui.Menu(selected, MenuItems, GUILayout.Width(180));

                scroll[0] = EditorGUILayout.BeginScrollView(scroll[0]);
                {
                    switch (selected)
                    {
                    case 0: PathFrom(); break;

                    case 1: FBXSetting(); break;
                    }
                }
                GUILayout.FlexibleSpace();
                EditorGUILayout.EndScrollView(); //0
            }
            EditorGUILayout.EndHorizontal();

            if (GUI.changed)
            {
                EditorUtility.SetDirty(ed.db);
            }
        }
Beispiel #2
0
        public static void ShowEditor()
        {
            DatabaseEditor ed = EditorWindow.GetWindow <DatabaseEditor>();

            ed.inited = false;
            ed.db     = XXToolsEditorGlobal.DB;
            ed.Show();
        }
Beispiel #3
0
 public override void OnGUI(DatabaseEditor ed)
 {
     base.OnGUI(ed);
     EditorGUILayout.BeginHorizontal();
     {
         LeftPanel();
         XXToolsEdGui.DrawVerticalLine(2f, XXToolsEdGui.DividerColor, 0f, 10f);
         RightPanel();
     }
     EditorGUILayout.EndHorizontal();
 }
Beispiel #4
0
        public override void OnEnable(DatabaseEditor ed)
        {
            base.OnEnable(ed);

            int cnt = ed.db.actorsPrefabs.Count;

            ed.db.actorsPrefabs = XXToolsEdUtil.CleanupList <GameObject>(ed.db.actorsPrefabs);
            if (cnt != ed.db.actorsPrefabs.Count)
            {
                EditorUtility.SetDirty(ed.db);
                AssetDatabase.SaveAssets();
            }
        }
Beispiel #5
0
 public static void OpenDatabaseEditor()
 {
     LoadOrCreateDatabase();
     DatabaseEditor.ShowEditor();
 }
Beispiel #6
0
 public virtual void OnGUI(DatabaseEditor ed)
 {
     this.ed = ed;
 }
Beispiel #7
0
 public virtual void Update(DatabaseEditor ed)
 {
     this.ed = ed;
 }
Beispiel #8
0
 public virtual void OnDisable(DatabaseEditor ed)
 {
     this.ed = ed;
 }