- Змінено
Is it possible to combine UGUI/textmeshpro with Spine?
So we have a board in main menu we want to drop in with Spine animation at the top of the screen. The problem with it is that the amount of coins and gems need to change as the player earns or spends them so it must be an UGUI or TextMesh Pro element.
We achieved something similar in-game by spawning the bone hierarchy and attaching the text to the board's bone. But now when we want to replicate that in main menu UI with UGUI it doesn't seem to be possible to spawn bone hierarchy at runtime the same way we did in game scene.
So are there any solutions to this that would allow us to combine UGUI or textmeshpro with Spine animation?
The bone hierarchy might have been a bit overkill if you only needed objects to follow the position of a few bones.
For that, I think you just want BoneFollower
.
Right-click on the SkeletonAnimation component and you'll see an "Add BoneFollower GameObject" option.
This creates a child GameObject with a BoneFollower component, which allows it to follow one of the skeleton's bones position.
Then you can put your UGUI/TextMeshPro hierarchy under that so it will follow one of the bones of your skeleton.
If you're referring to SkeletonGraphic, BoneFollower currently doesn't support it, but we could probably write similar component, as long as you don't do anything crazy with RectTransform positioning.
Pharan написавIf you're referring to SkeletonGraphic, BoneFollower currently doesn't support it, but we could probably write similar component, as long as you don't do anything crazy with RectTransform positioning.
This is exactly what we need. Any chance this could be written for one of the next updates?
It should be in the latest version.
Update your runtime and right-click on the SkeletonGraphic to find the option.
It works beautifully. Thank you for the incredible support. Have a plate of internet cookies.