From 5a738334161bd36adcc0baef0d9a8760246c94f5 Mon Sep 17 00:00:00 2001 From: pharan Date: Sat, 25 Aug 2018 05:54:51 +0800 Subject: [PATCH] [unity] Fix GetRemappedClone not using sourceMaterial when non-pma. --- .../spine-unity/Modules/AttachmentTools/AttachmentTools.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-unity/Assets/spine-unity/Modules/AttachmentTools/AttachmentTools.cs b/spine-unity/Assets/spine-unity/Modules/AttachmentTools/AttachmentTools.cs index 601f06685..344de6b17 100644 --- a/spine-unity/Assets/spine-unity/Modules/AttachmentTools/AttachmentTools.cs +++ b/spine-unity/Assets/spine-unity/Modules/AttachmentTools/AttachmentTools.cs @@ -1089,7 +1089,7 @@ namespace Spine.Unity.Modules.AttachmentTools { /// If true MeshAttachments will be cloned as linked meshes and will inherit animation from the original attachment. /// If true the size of the original attachment will be followed, instead of using the Sprite size. public static Attachment GetRemappedClone (this Attachment o, Sprite sprite, Material sourceMaterial, bool premultiplyAlpha = true, bool cloneMeshAsLinked = true, bool useOriginalRegionSize = false) { - var atlasRegion = premultiplyAlpha ? sprite.ToAtlasRegionPMAClone(sourceMaterial) : sprite.ToAtlasRegion(false); + var atlasRegion = premultiplyAlpha ? sprite.ToAtlasRegionPMAClone(sourceMaterial) : sprite.ToAtlasRegion(new Material(sourceMaterial) { mainTexture = sprite.texture }); return o.GetRemappedClone(atlasRegion, cloneMeshAsLinked, useOriginalRegionSize, 1f/sprite.pixelsPerUnit); }