mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[unity] Fix MecanimTranslator clearing incompletely.
This commit is contained in:
parent
1c04803b59
commit
97c5293fb1
@ -120,17 +120,25 @@ namespace Spine.Unity {
|
||||
readonly List<AnimatorClipInfo> clipInfoCache = new List<AnimatorClipInfo>();
|
||||
readonly List<AnimatorClipInfo> nextClipInfoCache = new List<AnimatorClipInfo>();
|
||||
#endif
|
||||
Animator animator;
|
||||
|
||||
Animator animator;
|
||||
public Animator Animator { get { return this.animator; } }
|
||||
|
||||
public void Initialize (Animator animator, SkeletonDataAsset skeletonDataAsset) {
|
||||
this.animator = animator;
|
||||
|
||||
previousAnimations.Clear();
|
||||
|
||||
animationTable.Clear();
|
||||
clipNameHashCodeTable.Clear();
|
||||
var data = skeletonDataAsset.GetSkeletonData(true);
|
||||
foreach (var a in data.Animations)
|
||||
animationTable.Add(a.Name.GetHashCode(), a);
|
||||
|
||||
clipNameHashCodeTable.Clear();
|
||||
#if UNITY_2017_1_OR_NEWER
|
||||
clipInfoCache.Clear();
|
||||
nextClipInfoCache.Clear();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Apply (Skeleton skeleton) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user