浏览代码

[unity] Fix SkeletonAnimator autoreset weight.

pharan 8 年之前
父节点
当前提交
c1dce1f476
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);