From e8ff8fd1f3b10c3c8edaef96578c7621907fa503 Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Mon, 30 Sep 2013 14:44:08 +0200 Subject: [PATCH] Fixed empty property value. --- spine-tk2d/Assets/Spine/SkeletonAnimation.cs | 4 ++-- spine-unity/Assets/Spine/SkeletonAnimation.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spine-tk2d/Assets/Spine/SkeletonAnimation.cs b/spine-tk2d/Assets/Spine/SkeletonAnimation.cs index d4139ed85..a859b8aef 100644 --- a/spine-tk2d/Assets/Spine/SkeletonAnimation.cs +++ b/spine-tk2d/Assets/Spine/SkeletonAnimation.cs @@ -53,7 +53,7 @@ public class SkeletonAnimation : SkeletonComponent { if (!useAnimationName) return; if (_animationName == value) return; _animationName = value; - if (value == null) + if (value == null || value.Length == 0) state.ClearTrack(0); else state.SetAnimation(0, value, loop); @@ -64,7 +64,7 @@ public class SkeletonAnimation : SkeletonComponent { base.Initialize(); // Call overridden method to initialize the skeleton. state = new Spine.AnimationState(skeletonDataAsset.GetAnimationStateData()); - if (_animationName != null) state.SetAnimation(0, _animationName, loop); + if (_animationName != null && _animationName.Length > 0) state.SetAnimation(0, _animationName, loop); } override public void UpdateSkeleton () { diff --git a/spine-unity/Assets/Spine/SkeletonAnimation.cs b/spine-unity/Assets/Spine/SkeletonAnimation.cs index 52c47c80e..84052cf49 100644 --- a/spine-unity/Assets/Spine/SkeletonAnimation.cs +++ b/spine-unity/Assets/Spine/SkeletonAnimation.cs @@ -53,7 +53,7 @@ public class SkeletonAnimation : SkeletonComponent { if (!useAnimationName) return; if (_animationName == value) return; _animationName = value; - if (value == null) + if (value == null || value.Length == 0) state.ClearTrack(0); else state.SetAnimation(0, value, loop); @@ -64,7 +64,7 @@ public class SkeletonAnimation : SkeletonComponent { base.Initialize(); // Call overridden method to initialize the skeleton. state = new Spine.AnimationState(skeletonDataAsset.GetAnimationStateData()); - if (_animationName != null) state.SetAnimation(0, _animationName, loop); + if (_animationName != null && _animationName.Length > 0) state.SetAnimation(0, _animationName, loop); } override public void UpdateSkeleton () {