[unity] Fixed UpdateMode when invisible not being used when instantiated off-screen. Closes #1883.

This commit is contained in:
Harald Csaszar 2021-04-28 19:54:48 +02:00
parent 1e888db53a
commit 25d7f8266f
2 changed files with 2 additions and 0 deletions

View File

@ -202,6 +202,7 @@ namespace Spine.Unity {
protected override void Awake () { protected override void Awake () {
base.Awake (); base.Awake ();
updateMode = updateWhenInvisible;
SyncRawImagesWithCanvasRenderers(); SyncRawImagesWithCanvasRenderers();
if (!this.IsValid) { if (!this.IsValid) {
#if UNITY_EDITOR #if UNITY_EDITOR

View File

@ -280,6 +280,7 @@ namespace Spine.Unity {
public virtual void Awake () { public virtual void Awake () {
Initialize(false); Initialize(false);
updateMode = updateWhenInvisible;
} }
#if UNITY_EDITOR && CONFIGURABLE_ENTER_PLAY_MODE #if UNITY_EDITOR && CONFIGURABLE_ENTER_PLAY_MODE