From 6d674c975f7cb1d4d1fcc2b2cdfd8ee679ce4314 Mon Sep 17 00:00:00 2001 From: badlogic Date: Thu, 19 Sep 2019 16:39:43 +0200 Subject: [PATCH] [chsarp] MeshAttachment Copy() and NewLinkedMesh() didn't copy region UVs properly. Closes #1499. --- spine-csharp/src/Attachments/MeshAttachment.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spine-csharp/src/Attachments/MeshAttachment.cs b/spine-csharp/src/Attachments/MeshAttachment.cs index c01d1fb62..1b9b8cfbf 100644 --- a/spine-csharp/src/Attachments/MeshAttachment.cs +++ b/spine-csharp/src/Attachments/MeshAttachment.cs @@ -162,6 +162,11 @@ namespace Spine { copy.regionOriginalHeight = regionOriginalHeight; copy.RegionRotate = RegionRotate; copy.RegionDegrees = RegionDegrees; + copy.RegionU = RegionU; + copy.RegionV = RegionV; + copy.RegionU2 = RegionU2; + copy.RegionV2 = RegionV2; + copy.Path = Path; copy.r = r; copy.g = g; @@ -199,12 +204,17 @@ namespace Spine { mesh.regionOriginalHeight = regionOriginalHeight; mesh.RegionDegrees = RegionDegrees; mesh.RegionRotate = RegionRotate; + mesh.RegionU = RegionU; + mesh.RegionV = RegionV; + mesh.RegionU2 = RegionU2; + mesh.RegionV2 = RegionV2; mesh.Path = Path; mesh.r = r; mesh.g = g; mesh.b = b; mesh.a = a; + mesh.deformAttachment = deformAttachment; mesh.ParentMesh = parentMesh != null ? parentMesh : this; mesh.UpdateUVs();