mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
[unity] Fixed error message "Animator is not playing an AnimatorController" at SkeletonMecanim and prefabs. Closes #1344.
This commit is contained in:
parent
9cdd36133e
commit
5e7e03d8f4
@ -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