Exemplo n.º 1
0
 /// <summary>Adds skin items from another skin. For items that already exist, the previous values are replaced.</summary>
 public static void AddAttachments(this Skin skin, Skin otherSkin)
 {
     if (otherSkin == null)
     {
         return;
     }
     otherSkin.CopyTo(skin, true, false);
 }
Exemplo n.º 2
0
        public static Skin GetClonedSkin(this Skeleton skeleton, string newSkinName, bool includeDefaultSkin = false, bool cloneAttachments = false, bool cloneMeshesAsLinked = true)
        {
            Skin skin        = new Skin(newSkinName);
            Skin defaultSkin = skeleton.data.DefaultSkin;
            Skin skin2       = skeleton.skin;

            if (includeDefaultSkin)
            {
                defaultSkin.CopyTo(skin, overwrite: true, cloneAttachments, cloneMeshesAsLinked);
            }
            skin2?.CopyTo(skin, overwrite: true, cloneAttachments, cloneMeshesAsLinked);
            return(skin);
        }
Exemplo n.º 3
0
        public static Skin GetClonedSkin(this Skeleton skeleton, string newSkinName, bool includeDefaultSkin = false, bool cloneAttachments = false, bool cloneMeshesAsLinked = true)
        {
            Skin destination = new Skin(newSkinName);
            Skin defaultSkin = skeleton.data.DefaultSkin;
            Skin skin        = skeleton.skin;

            if (includeDefaultSkin)
            {
                defaultSkin.CopyTo(destination, true, cloneAttachments, cloneMeshesAsLinked);
            }
            if (skin != null)
            {
                skin.CopyTo(destination, true, cloneAttachments, cloneMeshesAsLinked);
            }
            return(destination);
        }
Exemplo n.º 4
0
		//[System.Obsolete]
		public static void Append (this Skin destination, Skin source) {
			source.CopyTo(destination, true, false);
		}
Exemplo n.º 5
0
 public static void Append(this Skin destination, Skin source)
 {
     source.CopyTo(destination, overwrite: true, cloneAttachments: false);
 }