浏览代码

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

Harald Csaszar 4 年之前
父节点
当前提交
25d7f8266f

+ 1 - 0
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

+ 1 - 0
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