[unity] Fixed exception at SkeletonMecanim with UpdateTiming InLateUpdate. Closes #2392.

This commit is contained in:
Harald Csaszar 2023-10-04 19:37:58 +02:00
parent 209acdc892
commit cc352cf026
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ namespace Spine.Unity {
} }
public override void LateUpdate () { public override void LateUpdate () {
if (updateTiming == UpdateTiming.InLateUpdate && valid) if (updateTiming == UpdateTiming.InLateUpdate && valid && translator != null && translator.Animator != null)
UpdateAnimation(); UpdateAnimation();
// instantiation can happen from Update() after this component, leading to a missing Update() call. // instantiation can happen from Update() after this component, leading to a missing Update() call.
if (!wasUpdatedAfterInit) Update(); if (!wasUpdatedAfterInit) Update();

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.spine-unity", "name": "com.esotericsoftware.spine.spine-unity",
"displayName": "spine-unity Runtime", "displayName": "spine-unity Runtime",
"description": "This plugin provides the spine-unity runtime core.", "description": "This plugin provides the spine-unity runtime core.",
"version": "4.1.27", "version": "4.1.28",
"unity": "2018.3", "unity": "2018.3",
"author": { "author": {
"name": "Esoteric Software", "name": "Esoteric Software",