Răsfoiți Sursa

[csharp] Added missing csharp-specific lines for latest API changes (missing copying of Attachment.RenderObject). See #841.

Harald Csaszar 6 ani în urmă
părinte
comite
68f8cc40c4

+ 2 - 0
spine-csharp/src/Attachments/MeshAttachment.cs

@@ -153,6 +153,7 @@ namespace Spine {
 			if (parentMesh != null) return NewLinkedMesh();
 
 			MeshAttachment copy = new MeshAttachment(this.Name);
+			copy.RendererObject = RendererObject;
 			copy.regionOffsetX = regionOffsetX;
 			copy.regionOffsetY = regionOffsetY;
 			copy.regionWidth = regionWidth;
@@ -187,6 +188,7 @@ namespace Spine {
 		///<summary>Returns a new mesh with this mesh set as the <see cref="ParentMesh"/>.
 		public MeshAttachment NewLinkedMesh () {
 			MeshAttachment mesh = new MeshAttachment(Name);
+			mesh.RendererObject = RendererObject;
 			mesh.regionOffsetX = regionOffsetX;
 			mesh.regionOffsetY = regionOffsetY;
 			mesh.regionWidth = regionWidth;

+ 1 - 0
spine-csharp/src/Attachments/RegionAttachment.cs

@@ -181,6 +181,7 @@ namespace Spine {
 
 		public override Attachment Copy () {
 			RegionAttachment copy = new RegionAttachment(this.Name);
+			copy.RendererObject = RendererObject;
 			copy.regionOffsetX = regionOffsetX;
 			copy.regionOffsetY = regionOffsetY;
 			copy.regionWidth = regionWidth;