public void loadBTree()
        {
            string text = EditorUtility.OpenFilePanel("Load Behavior Tree", "Assets/Editor/BtreeEditor/Config", "xml");

            if (!string.IsNullOrEmpty(text))
            {
                Debugger.Log("loadBTree");
                BTreeEditorConfig _config = BTreeEditorSerialization.ReadXMLAtPath(text);
                mGraphDesigner = (new BTreeGraphDesigner());
                mGraphDesigner.load(_config);
            }
        }
Ejemplo n.º 2
0
        public void loadBTree(string type)
        {
            string text = EditorUtility.OpenFilePanel("Load Behavior Tree", BTreeEditorSerialization.m_ConfigPath, type);

            if (!string.IsNullOrEmpty(text))
            {
                Debugger.Log("loadBTree:" + type);
                BTreeEditorConfig _config = null;
                if (type == "xml")
                {
                    _config = BTreeEditorSerialization.ReadXMLAtPath(text);
                }
                else if (type == "binary")
                {
                    _config = BTreeEditorSerialization.ReadBinary(text);
                }
                mGraphDesigner = (new BTreeGraphDesigner());
                mGraphDesigner.load(_config);
            }
        }