RemDust

Hi guys !
I try to change the targeted bone by my bonefollower component but even if I can see the bone name changing in the Inspector at runtime it doesn't actually change the bone followed :wonder:

What am I doing wrong ?!

Thanks :)
RemDust
Posts: 120

Pharan

boneName is only checked on start. Checking it every frame for changes would be terrible for performance.

The way to change the target bone is to change boneFollower.bone
You can find the bone reference by using skeletonAnimation.Skeleton.FindBone("my bone name");
Official Esoteric Assorted Furniture Cleaner and Teahouse | Check out the Spine Users Tumblr Blog: spine-users.tumblr.com
pharan.deviantart.com | pharantriestoanimatestuff.tumblr.com - - - Windows 10 - Spine-Unity.
User avatar
Pharan

Pharan
Posts: 4275

RemDust

Silly mistake, thanks :)
RemDust
Posts: 120

Pharan

We'll try make the docs more clear on it. :)
Official Esoteric Assorted Furniture Cleaner and Teahouse | Check out the Spine Users Tumblr Blog: spine-users.tumblr.com
pharan.deviantart.com | pharantriestoanimatestuff.tumblr.com - - - Windows 10 - Spine-Unity.
User avatar
Pharan

Pharan
Posts: 4275


Return to Unity