mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
[unity] Fixed SkeletonMecanim leftover animation rotations when transitioning to an empty "Write Defaults" state. Fixes #1321.
This commit is contained in:
parent
ab9b5dc731
commit
a3916b82c8
@ -379,12 +379,13 @@ namespace Spine.Unity {
|
||||
var layerInfos = layerClipInfos[layer];
|
||||
int clipInfoCount = animator.GetCurrentAnimatorClipInfoCount(layer);
|
||||
int nextClipInfoCount = animator.GetNextAnimatorClipInfoCount(layer);
|
||||
|
||||
|
||||
var clipInfos = layerInfos.clipInfos;
|
||||
var nextClipInfos = layerInfos.nextClipInfos;
|
||||
var interruptingClipInfos = layerInfos.interruptingClipInfos;
|
||||
|
||||
layerInfos.isInterruptionActive = (clipInfoCount == 0 && nextClipInfoCount == 0);
|
||||
layerInfos.isInterruptionActive = (clipInfoCount == 0 && clipInfos.Count != 0 &&
|
||||
nextClipInfoCount == 0 && nextClipInfos.Count != 0);
|
||||
|
||||
// Note: during interruption, GetCurrentAnimatorClipInfoCount and GetNextAnimatorClipInfoCount
|
||||
// are returning 0 in calls above. Therefore we keep previous clipInfos and nextClipInfos
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user