// public override CatComponent CloneComponent(GameObject gameObject) // { // ModelComponent modelComponent = new ModelComponent(gameObject); // modelComponent.Model = Model; // // // new material model // modelComponent.m_catModelInstance = m_catModelInstance.Clone(); // return modelComponent; // } // // public override bool SaveToNode(XmlNode node, XmlDocument doc) // { // XmlElement modelComponent = doc.CreateElement(typeof(ModelComponent).Name); // node.AppendChild(modelComponent); // // modelComponent.SetAttribute("name", Model.GetName()); // // save parameter tips // m_catModelInstance.GetMaterial().SaveToNode(modelComponent, doc, true); // // return true; // } protected override void PostSerial(ref XmlNode _node, XmlDocument _doc) { // <Post_ModelName value="Cat" /> XmlElement eleModelName = _doc.CreateElement("Post_ModelName"); _node.AppendChild(eleModelName); string modelNameValue = ""; if (m_model != null) { modelNameValue = m_model.GetName(); } eleModelName.SetAttribute("value", modelNameValue); // <Material> if (m_catModelInstance != null) { m_catModelInstance.GetMaterial().SaveToNode(_node, _doc, true); } }