diff --git a/spine-csharp/src/Animation.cs b/spine-csharp/src/Animation.cs index cdbca44dcf..5beb89dab2 100644 --- a/spine-csharp/src/Animation.cs +++ b/spine-csharp/src/Animation.cs @@ -743,7 +743,7 @@ public class DeformTimeline : CurveTimeline { public VertexAttachment Attachment { get { return attachment; } set { attachment = value; } } override public int PropertyId { - get { return ((int)TimelineType.Deform << 24) + slotIndex; } + get { return ((int)TimelineType.Deform << 24) + attachment.id + slotIndex; } } public DeformTimeline (int frameCount) diff --git a/spine-csharp/src/Attachments/VertexAttachment.cs b/spine-csharp/src/Attachments/VertexAttachment.cs index 23c502e9db..08e6994e24 100644 --- a/spine-csharp/src/Attachments/VertexAttachment.cs +++ b/spine-csharp/src/Attachments/VertexAttachment.cs @@ -33,10 +33,15 @@ namespace Spine { /// >An attachment with vertices that are transformed by one or more bones and can be deformed by a slot's vertices. public class VertexAttachment : Attachment { + static int nextID = 0; + + internal int id = (nextID++ & 65535) << 11; internal int[] bones; internal float[] vertices; internal int worldVerticesLength; + /// Gets a unique ID for this attachment. + public int Id { get { return id; } } public int[] Bones { get { return bones; } set { bones = value; } } public float[] Vertices { get { return vertices; } set { vertices = value; } } public int WorldVerticesLength { get { return worldVerticesLength; } set { worldVerticesLength = value; } }