From b1c1dac17a8b862dc30a43c2c7bd1e1d7732b0d2 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Thu, 26 Sep 2019 18:43:17 +0200 Subject: [PATCH] [unity] Fixed ignored SkeletonAnimation looping change when AnimationName is the same. Closes #1396. --- .../Runtime/spine-unity/Components/SkeletonAnimation.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs index 73d981778..955e57d74 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs @@ -96,8 +96,11 @@ namespace Spine.Unity { } } set { - if (_animationName == value) - return; + if (_animationName == value) { + TrackEntry entry = state.GetCurrent(0); + if (entry != null && entry.loop == loop) + return; + } _animationName = value; if (string.IsNullOrEmpty(value)) {