diff --git a/spine-csharp/src/Animation.cs b/spine-csharp/src/Animation.cs
index c033af940..704fa5027 100644
--- a/spine-csharp/src/Animation.cs
+++ b/spine-csharp/src/Animation.cs
@@ -1923,9 +1923,9 @@ namespace Spine {
Attachment slotAttachment = pose.attachment;
if (slotAttachment != attachment) {
- VertexAttachment vertexAttachment = slotAttachment as VertexAttachment;
- if ((vertexAttachment == null)
- || vertexAttachment.TimelineAttachment != attachment) return;
+ IHasSequence sequenceAttachment = slotAttachment as IHasSequence;
+ if ((sequenceAttachment == null)
+ || sequenceAttachment.TimelineAttachment != attachment) return;
}
if (direction == MixDirection.Out) {
diff --git a/spine-csharp/src/Attachments/IHasSequence.cs b/spine-csharp/src/Attachments/IHasSequence.cs
index 15da803ca..74ec9acbd 100644
--- a/spine-csharp/src/Attachments/IHasSequence.cs
+++ b/spine-csharp/src/Attachments/IHasSequence.cs
@@ -42,6 +42,9 @@ namespace Spine {
void SetColor (Color32F color);
void SetColor (float r, float g, float b, float a);
Sequence Sequence { get; }
+ /// Timelines for the timeline attachment are also applied to this attachment.
+ /// May be null if no attachment-specific timelines should be applied.
+ Attachment TimelineAttachment { get; set; }
void UpdateSequence ();
}
}
diff --git a/spine-csharp/src/Attachments/MeshAttachment.cs b/spine-csharp/src/Attachments/MeshAttachment.cs
index 52f864287..a5800d830 100644
--- a/spine-csharp/src/Attachments/MeshAttachment.cs
+++ b/spine-csharp/src/Attachments/MeshAttachment.cs
@@ -56,8 +56,7 @@ namespace Spine {
/// The UV pair for each vertex, normalized within the texture region.
public float[] RegionUVs { get { return regionUVs; } set { regionUVs = value; } }
- /// The UV pair for each vertex, normalized within the entire texture.
- ///
+ /// Triplets of vertex indices which describe the mesh's triangulation.
public int[] Triangles { get { return triangles; } set { triangles = value; } }
public Color32F GetColor () {
@@ -74,6 +73,10 @@ namespace Spine {
public string Path { get { return path; } set { path = value; } }
public Sequence Sequence { get { return sequence; } }
+ Attachment IHasSequence.TimelineAttachment {
+ get { return timelineAttachment; }
+ set { timelineAttachment = (VertexAttachment)value; }
+ }
public MeshAttachment ParentMesh {
get { return parentMesh; }
diff --git a/spine-csharp/src/Attachments/RegionAttachment.cs b/spine-csharp/src/Attachments/RegionAttachment.cs
index 09bf19f1c..654ea8018 100644
--- a/spine-csharp/src/Attachments/RegionAttachment.cs
+++ b/spine-csharp/src/Attachments/RegionAttachment.cs
@@ -46,6 +46,7 @@ namespace Spine {
public const int BRX = 6, BRY = 7;
internal readonly Sequence sequence;
+ internal Attachment timelineAttachment;
internal float x, y, rotation, scaleX = 1, scaleY = 1, width, height;
// Color is a struct, set to protected to prevent
// Color color = slot.color; color.a = 0.5;
@@ -75,11 +76,13 @@ namespace Spine {
public string Path { get; set; }
public Sequence Sequence { get { return sequence; } }
+ public Attachment TimelineAttachment { get { return timelineAttachment; } set { timelineAttachment = value; } }
public RegionAttachment (string name, Sequence sequence)
: base(name) {
if (sequence == null) throw new ArgumentException("sequence cannot be null.", "sequence");
this.sequence = sequence;
+ timelineAttachment = this;
}
/// Copy constructor.
@@ -95,6 +98,7 @@ namespace Spine {
height = other.height;
color = other.color;
sequence = new Sequence(other.sequence);
+ timelineAttachment = other.timelineAttachment;
}
///