示例#1
0
 public void Save(SkinMeshData skin)
 {
     if (!this)
     {
         return;        // if deleted
     }
     if (skin == null)
     {
         return;
     }
     skin.Name = this.name;
     Skill.Framework.IO.XmlDocument document = new Framework.IO.XmlDocument();
     document.AppendChild(skin.ToXmlElement());
     XmlData = document.OuterXml;
     UnityEditor.EditorUtility.SetDirty(this);
 }
示例#2
0
 public void Save(AnimationTreeData tree)
 {
     if (!this)
     {
         return;        // if deleted
     }
     if (tree == null)
     {
         return;
     }
     tree.Name = this.name;
     Skill.Framework.IO.XmlDocument document = new Framework.IO.XmlDocument();
     document.AppendChild(tree.ToXmlElement());
     XmlData = document.OuterXml;
     UnityEditor.EditorUtility.SetDirty(this);
 }
示例#3
0
 public void Save(BehaviorTreeData data)
 {
     if (!this)
     {
         return;        // if deleted
     }
     if (data == null)
     {
         return;
     }
     data.Name = this.name;
     Skill.Framework.IO.XmlDocument document = new Framework.IO.XmlDocument();
     document.AppendChild(data.ToXmlElement());
     XmlData = document.OuterXml;
     UnityEditor.EditorUtility.SetDirty(this);
 }
示例#4
0
        /// <summary>
        /// Copy localPosition, localRotation and localScale of selected objetc to clipboard as formated string
        /// </summary>
        public static void CopyTransformHierarchy()
        {
            Transform t = Selection.activeTransform;

            if (t != null)
            {
                TransformData tr = new TransformData();
                tr.Copy(t);

                Skill.Framework.IO.XmlDocument document = new Framework.IO.XmlDocument();
                document.AppendChild(tr.ToXmlElement());

                EditorGUIUtility.systemCopyBuffer = document.OuterXml;
                Debug.Log("Hierarchy Transform copied to clipboard.");
            }
            else
            {
                Debug.LogError("No selected transform to copy.");
            }
        }