private void LoadXML(string path)
        {
            BehaviorTreeXMLSerializer serializer = new BehaviorTreeXMLSerializer();

            string id;

            BehaviorNodeControl[] controls;

            if (serializer.Deserialize(path, m_editor.TypeCahce, out id, out controls))
            {
                m_tools.TreeIdField.Value = id;

                // Quick hack to fix issue where manually setting field value does not raise value changed event
                if (!string.IsNullOrEmpty(id))
                {
                    m_tools.GenerateButton.Enabled = true;
                }
                else
                {
                    m_tools.GenerateButton.Enabled = false;
                }

                m_editor.ClearAll();
                m_editor.AddNodeGroup(controls);
            }
        }
        private void LoadXML( string path )
        {
            BehaviorTreeXMLSerializer serializer = new BehaviorTreeXMLSerializer();

            string id;
            BehaviorNodeControl[] controls;

            if ( serializer.Deserialize( path, m_editor.TypeCahce, out id, out controls ) )
            {
                m_tools.TreeIdField.Value = id;

                // Quick hack to fix issue where manually setting field value does not raise value changed event
                if ( !string.IsNullOrEmpty( id ) )
                {
                    m_tools.GenerateButton.Enabled = true;
                }
                else
                {
                    m_tools.GenerateButton.Enabled = false;
                }

                m_editor.ClearAll();
                m_editor.AddNodeGroup( controls );
            }
        }
        private void SaveXML(string path, BehaviorNodeControl root)
        {
            BehaviorTreeXMLSerializer serializer = new BehaviorTreeXMLSerializer();
            string xml = serializer.Serialize(m_tools.TreeIdField.Value, root);

            File.WriteAllText(path, xml);
            AssetDatabase.Refresh();
        }
 private void SaveXML( string path, BehaviorNodeControl root )
 {
     BehaviorTreeXMLSerializer serializer = new BehaviorTreeXMLSerializer();
     string xml = serializer.Serialize( m_tools.TreeIdField.Value, root );
     File.WriteAllText( path, xml );
     AssetDatabase.Refresh();
 }