mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 06:14:53 +08:00
[unity] Fixed error message "Animator is not playing an AnimatorController" at SkeletonMecanim and prefabs. Closes #1344.
This commit is contained in:
parent
86a529d01c
commit
74560c66a3
@ -81,8 +81,12 @@ namespace Spine.Unity {
|
||||
if (Application.isPlaying) {
|
||||
translator.Apply(skeleton);
|
||||
} else {
|
||||
if (translatorAnimator != null && translatorAnimator.isInitialized)
|
||||
if (translatorAnimator != null && translatorAnimator.isInitialized &&
|
||||
translatorAnimator.isActiveAndEnabled && translatorAnimator.runtimeAnimatorController != null) {
|
||||
// Note: Rebind is required to prevent warning "Animator is not playing an AnimatorController" with prefabs
|
||||
translatorAnimator.Rebind();
|
||||
translator.Apply(skeleton);
|
||||
}
|
||||
}
|
||||
#else
|
||||
translator.Apply(skeleton);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user