From 201f0bd7d58393e54b324ffa0b600e7d81bb83fd Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Wed, 22 Apr 2020 16:31:27 +0200 Subject: [PATCH] [unity] Fixed an out of bounds access in SkeletonMecanim when multiple interruptions occur. Closes #1661. --- .../Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs index a74d09875..fb075070a 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs @@ -417,9 +417,8 @@ namespace Spine.Unity { var interruptingStateInfo = animator.GetNextAnimatorStateInfo(layer); layerInfos.isLastFrameOfInterruption = interruptingStateInfo.fullPathHash == 0; if (!layerInfos.isLastFrameOfInterruption) { - layerInfos.interruptingClipInfoCount = interruptingClipInfos.Count; - animator.GetNextAnimatorClipInfo(layer, interruptingClipInfos); + layerInfos.interruptingClipInfoCount = interruptingClipInfos.Count; float oldTime = layerInfos.interruptingStateInfo.normalizedTime; float newTime = interruptingStateInfo.normalizedTime; layerInfos.interruptingClipTimeAddition = newTime - oldTime;