diff --git a/spine-unity/Assets/spine-unity/Modules/SkeletonGraphic/BoneFollowerGraphic.cs b/spine-unity/Assets/spine-unity/Modules/SkeletonGraphic/BoneFollowerGraphic.cs index 4bdfca848..f399e9bc2 100644 --- a/spine-unity/Assets/spine-unity/Modules/SkeletonGraphic/BoneFollowerGraphic.cs +++ b/spine-unity/Assets/spine-unity/Modules/SkeletonGraphic/BoneFollowerGraphic.cs @@ -66,8 +66,9 @@ namespace Spine.Unity { bone = skeletonGraphic.Skeleton.FindBone(boneName); #if UNITY_EDITOR - if (Application.isEditor) + if (Application.isEditor) { LateUpdate(); + } #endif } @@ -91,7 +92,9 @@ namespace Spine.Unity { var thisTransform = this.transform as RectTransform; if (thisTransform == null) return; - float scale = skeletonGraphic.canvas.referencePixelsPerUnit; + var canvas = skeletonGraphic.canvas; + if (canvas == null) canvas = skeletonGraphic.GetComponentInParent(); + float scale = canvas.referencePixelsPerUnit; if (skeletonTransformIsParent) { // Recommended setup: Use local transform properties if Spine GameObject is the immediate parent