mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 08:38:43 +08:00
[unity] Shorten BoneFollower.SetBone string API.
This commit is contained in:
parent
02d1bfc465
commit
f62e2e12b8
@ -74,7 +74,7 @@ namespace Spine.Unity {
|
||||
|
||||
/// <summary>
|
||||
/// Sets the target bone by its bone name. Returns false if no bone was found.</summary>
|
||||
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;
|
||||
|
||||
@ -156,7 +156,7 @@ namespace Spine.Unity.Editor {
|
||||
if (Event.current.type == EventType.Repaint) {
|
||||
if (addBoneFollower) {
|
||||
var boneFollower = follower.gameObject.AddComponent<BoneFollower>();
|
||||
boneFollower.SetBoneByName(follower.Slot.Data.BoneData.Name);
|
||||
boneFollower.SetBone(follower.Slot.Data.BoneData.Name);
|
||||
addBoneFollower = false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user