Example #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);
 }
Example #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);
        }
        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);
        }
Example #4
0
		//[System.Obsolete]
		public static void Append (this Skin destination, Skin source) {
			source.CopyTo(destination, true, false);
		}
Example #5
0
 public static void Append(this Skin destination, Skin source)
 {
     source.CopyTo(destination, overwrite: true, cloneAttachments: false);
 }