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