Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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.");
            }
        }