Original question: What’s the proper way to delete a Bone and all its children from a Skeleton?
Hello,
I have an actor composed by a hierarchy of Skeleton + Bones, and I’m struggling with the way to remove a Bone and all its children. Disposing a Bone doesn’t make it disapear from the inspector, it just loses its paren.
What’s the proper way to do this?
I don’t find a method in the Skeleton to rermove a bone.
Should I remove the bone from the skeleton bones property manually?
This is working for me, but seems to be quite dangerous…
I just gave it a try ( bone.dispose() ), and it appears the inspector needed an action (like collapsing and expanding again the bone hierachy) to see the bone disappear. So regarless of the display in the Inspector, it seems to work on my side
NB: FYI when you select any item in the inspector, globalThis.debugNode is then pointing to this item. So you can select a bone and go : bone = globalThis.debugNode
In the console, before being able to play with this bone reference