mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
Fixed empty property value.
This commit is contained in:
parent
52696c2607
commit
e8ff8fd1f3
@ -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 () {
|
||||
|
||||
@ -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 () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user