Browse Source

[unity] Fix SkeletonAnimator autoreset weight.

pharan 8 years ago
parent
commit
c1dce1f476
1 changed files with 1 additions and 1 deletions
  1. 1 1
      spine-unity/Assets/spine-unity/SkeletonAnimator.cs

+ 1 - 1
spine-unity/Assets/spine-unity/SkeletonAnimator.cs

@@ -101,7 +101,7 @@ namespace Spine.Unity {
 				previousAnimations.Clear();
 
 				for (int layer = 0, n = animator.layerCount; layer < n; layer++) {
-					float layerWeight = animator.GetLayerWeight(layer);
+					float layerWeight = (layer == 0) ? 1 : animator.GetLayerWeight(layer);
 					if (layerWeight <= 0) continue;
 
 					AnimatorStateInfo nextStateInfo = animator.GetNextAnimatorStateInfo(layer);