- 수정됨
Unity bug
Hi,
I am facing this problem while handling animations in Unity. Can anyone help please. :shh:
I used this runtime for unity
https://esotericsoftware.com/files/runtimes/unity/spine-unity-3.8-2020-12-09.unitypackage
SkeletonGraphics don’t work optimal with unity UI , it is totally manual we might need to change the characters their type their animations there are also no call backs or animation events with SkeletonGraphics also facing anchoring issues with skeletonGraphics
We can’t make Animator state machine out of skeletongraphics for unity ui like this image I shared here. Can anybody suggest solution to this?
Rajesh wroteit is totally manual we might need to change the characters their type their animations
I'm afraind I don't understand what you mean by this. Please use punctuation or create separate sentences describing everything in more detail, otherwise we will have a hard time guessing what exactly you mean.
Rajesh wrotethere are also no call backs or animation events with SkeletonGraphics
This is not true, SkeletonGraphic
provides the same callback and event APIs as SkeletonAnimation
, you can access it normally via skeletonGraphic.AnimationState
. What are you missing?
Rajesh wrotealso facing anchoring issues
If you are facing anchoring issues, most likely your SkeletonGraphic's
RectTransform bounds have not been setup to match the size of the skeleton. See the documentation here on how to set it up in one click:
spine-unity Runtime Documentation: Match RectTransform bounds for correct visibility
What is not yet supported is automatically resizing the skeleton alongside the parent's RectTransform, currently it will only move without scaling. We have an issue ticket for it here:
https://github.com/EsotericSoftware/spine-runtimes/issues/1640
Rajesh wroteWe can’t make Animator state machine out of skeletongraphics for unity ui like this image I shared here. Can anybody suggest solution to this?
Currently SkeletonGraphic
only supports the same AnimationState based animation API as SkeletonAnimation
. There is some rewriting of the main components (SkeletonAnimation
, SkeletonMecanim
, SkeletonGraphic
, SkeletonRenderer
) in progress which (if everything goes well) will allow to use SkeletonGraphic
with the Mecanim API like SkeletonMecanim
. We have moved this feature to the 4.1-beta spine-unity runtime however, as 4.0-beta is already very late in its beta phase and shall become stable 4.0 soon. You can find the issue ticket here:
https://github.com/EsotericSoftware/spine-runtimes/issues/1414
If you do not want to wait for this feature in 4.1-beta, you can use a Mecanim wrapper around SkeletonGraphic as demonstrated in the example scene Spine Examples/Other Examples/StateMachine SkeletonAnimation/Mecanim Logic SkeletonAnimation View.scene
that comes with the spine-unity unitypackage. This script would need to be adjusted accordingly to target SkeletonGraphic
instead of SkeletonAnimation
, but this should be rather easy to do.
Thanks Herald, it works now.
Glad you've figured it out, thanks for getting back to us.
Our programmer facing one more problem as he wants to get the anchor pointed shifted to the center of whole image. I have moved root bone towards center and exported json for unity. But devs complained that the anchor point is not in the center and still showing at the bottom point. So how this issue can be solved?
Most likely you have adjusted the wrong bone or misunderstood what your programmer means by "get the anchor pointed shifted to the center of whole image". Bones and attachment images can be translated to any desired location, so there should be nothing preventing you from accomplishing your goal. Could you please show a screenshot of your setup in Spine?