From 25d7f8266f976a3ae6bdcf23afca2af4b7f23a6e Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Wed, 28 Apr 2021 19:54:48 +0200 Subject: [PATCH] [unity] Fixed UpdateMode when invisible not being used when instantiated off-screen. Closes #1883. --- .../Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs | 1 + .../Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs index d01fb7523..38ef41147 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs @@ -202,6 +202,7 @@ namespace Spine.Unity { protected override void Awake () { base.Awake (); + updateMode = updateWhenInvisible; SyncRawImagesWithCanvasRenderers(); if (!this.IsValid) { #if UNITY_EDITOR 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 424f78212..332ece243 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs @@ -280,6 +280,7 @@ namespace Spine.Unity { public virtual void Awake () { Initialize(false); + updateMode = updateWhenInvisible; } #if UNITY_EDITOR && CONFIGURABLE_ENTER_PLAY_MODE