From f62e2e12b807fae676dc3b4af5556cb5687984eb Mon Sep 17 00:00:00 2001 From: pharan Date: Mon, 26 Jun 2017 14:14:04 +0800 Subject: [PATCH] [unity] Shorten BoneFollower.SetBone string API. --- spine-unity/Assets/spine-unity/BoneFollower.cs | 4 ++-- .../Editor/BoundingBoxFollowerInspector.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spine-unity/Assets/spine-unity/BoneFollower.cs b/spine-unity/Assets/spine-unity/BoneFollower.cs index c9c7746c9..2681c4ff2 100644 --- a/spine-unity/Assets/spine-unity/BoneFollower.cs +++ b/spine-unity/Assets/spine-unity/BoneFollower.cs @@ -74,7 +74,7 @@ namespace Spine.Unity { /// /// Sets the target bone by its bone name. Returns false if no bone was found. - public bool SetBoneByName (string name) { + public bool SetBone (string name) { bone = skeletonRenderer.skeleton.FindBone(name); if (bone == null) { Debug.LogError("Bone not found: " + name, this); @@ -130,7 +130,7 @@ namespace Spine.Unity { if (bone == null) { if (string.IsNullOrEmpty(boneName)) return; bone = skeletonRenderer.skeleton.FindBone(boneName); - if (!SetBoneByName(boneName)) return; + if (!SetBone(boneName)) return; } Transform thisTransform = this.transform; diff --git a/spine-unity/Assets/spine-unity/Modules/BoundingBoxFollower/Editor/BoundingBoxFollowerInspector.cs b/spine-unity/Assets/spine-unity/Modules/BoundingBoxFollower/Editor/BoundingBoxFollowerInspector.cs index f00f3cb3c..8d340d2f3 100644 --- a/spine-unity/Assets/spine-unity/Modules/BoundingBoxFollower/Editor/BoundingBoxFollowerInspector.cs +++ b/spine-unity/Assets/spine-unity/Modules/BoundingBoxFollower/Editor/BoundingBoxFollowerInspector.cs @@ -156,7 +156,7 @@ namespace Spine.Unity.Editor { if (Event.current.type == EventType.Repaint) { if (addBoneFollower) { var boneFollower = follower.gameObject.AddComponent(); - boneFollower.SetBoneByName(follower.Slot.Data.BoneData.Name); + boneFollower.SetBone(follower.Slot.Data.BoneData.Name); addBoneFollower = false; }