From 538245fcdaf1280a90fdb59d76aab7c968d7102a Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Tue, 1 Jun 2021 17:16:27 +0200 Subject: [PATCH] [unity] Fix for UpdateWhenInvisible issue introduced in commit 5cb54bd. Closes #1897. See #1883. --- .../Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs index 332ece243..a40a51052 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs @@ -503,7 +503,10 @@ namespace Spine.Unity { } public void OnBecameVisible () { + UpdateMode previousUpdateMode = updateMode; updateMode = UpdateMode.FullUpdate; + if (previousUpdateMode != UpdateMode.FullUpdate) + LateUpdate(); // OnBecameVisible is called after LateUpdate() } public void OnBecameInvisible () {