diff --git a/spine-csharp/src/SkeletonData.cs b/spine-csharp/src/SkeletonData.cs index 5f7088a8b..c4a46c841 100644 --- a/spine-csharp/src/SkeletonData.cs +++ b/spine-csharp/src/SkeletonData.cs @@ -147,6 +147,24 @@ namespace Spine { } // --- Animations + /// + /// Collects animations used by slider constraints. + /// Slider animations are designed to be applied by slider constraints rather than on their own. Applications that have a user + /// choose an animation may want to exclude them. + /// + public ExposedList FindSliderAnimations (ExposedList animations) { + IConstraintData[] constraints = this.constraints.Items; + for (int i = 0, n = this.constraints.Count; i < n; i++) { + SliderData data = constraints[i] as SliderData; + if (data != null && data.animation != null) + animations.Add(data.animation); + } + return animations; + } + + /// + /// Finds an animation by comparing each animation's name. It is more efficient to cache the results of this method than to + /// call it multiple times. /// May be null. public Animation FindAnimation (string animationName) { if (animationName == null) throw new ArgumentNullException("animationName", "animationName cannot be null.");