浏览代码

[unity] Minor improvement (added #if UNITY_EDITOR) after merging pull request, see #1939, see commit 5fd4494e.

Harald Csaszar 4 年之前
父节点
当前提交
57dadbdd81
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs

+ 2 - 0
spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs

@@ -320,10 +320,12 @@ namespace Spine.Unity {
 		}
 	#endif
 
+	#if UNITY_EDITOR
 		void OnEnable() {
 			if (!Application.isPlaying)
 				LateUpdate();
 		}
+	#endif
 
 		void OnDisable () {
 			if (clearStateOnDisable && valid)