• RuntimesUnityBugs
  • 3.8 BoneFollowerGraphic: Odd behavior updating bone name at runtime

I noticed some baffling behavior with BoneFollowerGraphic in the 3.8 Unity runtime.

I have a prefab with an object that follows a bone. I instantiate a copy of the prefab at runtime. In the inspector, I select the game object with a BoneFollowerGraphic behavior and update the bone name.

In some cases, the following behavior will stop completely, even though the bone is still in motion. In other cases, the behavior changes depending on which bone I 'came from'. eg: A->C behaves differently from A->B->C.

I can produce a sample project but wanted to start with a question to see if I'm missing something. eg: if I need to call some initialization or update method after changing the bone name. I'm able to reproduce the issue just by making the change at runtime in the inspector. I'm not doing anything obvious to me that would cause this behavior in code.

Related Discussions
...

Have you tried it with the latest runtimes (4.1 or 4.2)? 3.8 is very old and many bugs have been fixed since then. We don't usually investigate or do bug fixes for such old versions anymore.

I have not, but that's a good idea. I actually didn't even realize it's as old as it is.

Part of the challenge is the large number of Spine assets that need to be upgraded (I realize it can be scripted).

Confirming whether the new version fixes it seems like a good start. Obvious in hindsight but thanks for the suggestion!

Yep, the last 3.8 release is over 3 years old now.

In a week or so we'll publish a blog post with scripts that shows how to export many project files. Hopefully that will help make these upgrade situations easier.

10 jours plus tard

@slothwerks BoneFollowerGraphic should not have changed much since 3.8. Calling bonefollower.SetBone(bonename); from your runtime code should be sufficient, there is no additional call required.

Regarding the Inspector: do you mean you changed the bone name via the Inspector while inside play-mode?