• RuntimesUnity
  • How to make Spine follow Rect Transform in Unity?

I have a spine animation as part of my UI, however, I can't get it to obey the rect transform properly for other screen resolutions. Thanks in advance!

Related Discussions
...

What do you mean by not "properly" obeying the rect transform? Could you please share a screenshot or describe in more detail?

By the way, this post was tagged with the Tutorial tag, but since the question is about Unity, I changed it to the Unity tag.

I assume that you mean that the SkeletonGraphic object is not automatically scaled along with the size of a parent RectTransform. We are sorry that we didn't get to this issue ticket yet, it's on our roadmap here:
EsotericSoftware/spine-runtimes1640
We will see that we can implement it soon since it has been delayed for such a long time already.

25 giorni dopo

This feature has just been implemented and pushed to the 4.1 and 4.2-beta branches. From the changelog:

SkeletonGraphic now supports automatic scaling based on its RectTransform bounds. Automatic scaling can be enabled by setting the added Layout Scale Mode Inspector property to either Width Controls Height, Height Controls Width, FitInParent or EnvelopeParent. It is set to None by default to keep previous behaviour and avoid breaking existing projects. To modify the reference layout bounds, hit the additional Edit Layout Bounds toggle button to switch into edit mode, adjust the bounds or hit Match RectTransform with Mesh, and hit the button again when done adjusting. The skeleton will now be scaled accordingly to fit the reference layout bounds to the object's RectTransform.

New 4.1 and 4.2-beta unitypackages are available for download here as usual:
https://esotericsoftware.com/spine-unity-download

  • MVP ha risposto a questo messaggio
    2 anni dopo

    Harald Why are there no other versions, just 4.1 and 4.2?

    Harald hy do versions lower than 4.1 not support this feature?

    @MVP New features are added to the recent runtime versions. New features are not backported to old versions such as 4.0, which is already several years old. Backporting added features might break existing projects.

    Why are you using versions older than 4.1 if you seem to be starting a new project now?