• Runtimes
  • Unity UI Toolkit Support

Hi, is there any estimate when Spine will add support to UI Toolkit?

Thanks,
Gustavo

Related Discussions
...

Hi Gustavo,

Currently, there is no specific estimate for when Spine will add support for Unity's UI Toolkit. The development team has other high-priority features and tasks that need to be addressed first. However, you can keep an eye on the issue tracker for any updates regarding this feature.

Thank you for your understanding!

@gustavo_shoelace As we have been contacted by Unity recently, we will very soon provide an experimental version compatible with UI Toolkit of Unity 2022.3. This package (due to UI Toolkit 2022.3 limitations) unfortunately does not provide comfortable Inspector interaction and requires setting up asset reference strings. This "provided as-is" package will just serve as an intermediate solution until the fully supported package for UI Toolkit of Unity 2023.2+ is ready, which should then provide the desired support for using asset references comfortably.

We can't say yet when the package for UI Toolkit 2023.2+ will be ready.

    Thanks @Harald i just commented in the github issue about two errors when importing the extension. Please, let me know.

    @gustavo_shoelace Thanks for the notification, I've seen it already, just didn't get to have a look earlier. I've now replied via a comment (just a few minutes ago).

    8 jours plus tard

    Harald We can't say yet when the package for UI Toolkit 2023.2+ will be ready.

    @gustavo_shoelace We have just released a first experimental version of a com.esotericsoftware.spine.ui-toolkit UPM package for Unity 2023.2+. This version finally allows the comfortable assignment of a SkeletonDataAsset and lets you select skins and animations via a dropdown popup like the other Spine components have always offered.
    For details see this issue ticket comment:
    EsotericSoftware/spine-runtimes1943

    This UPM package is still experimental and open to change, so if you encounter any problems or are missing something vital, please don't hesitate to let us know.

    20 jours plus tard

    How does one contain the spine to the Visual Element size? It seems to disregard the visual tree structure.

      pjarnfelt How does one contain the spine to the Visual Element size? It seems to disregard the visual tree structure.

      Sorry to hear you're having troubles! The SpineVisualElement should always adjust to the rect size, you currently can't configure it to not do that. Does it not change at all if you resize the rectangle? Or is it too large? If the latter is the problem, it might be that the initial frame has fewer attachments active (or more clipped), which defines the mesh bounds for future adjustments.

      Yea, so my "appear" animation is scaling in from 50% to 100% atm and it does look correct when I put the Visual Element child at 0.5 scale with USS. But that's a hack and doesn't allow for arbitrary scales.

      How do you define an artboard scale that it can use as reference so I can scale move and animate however I want, but still end up within this visual element bounds?

      I think I fixed it. This is our internal description that might be useful for someone else:

      In Unity, when using Spine with UI Toolkit, it needs to know the default size of the animations to scale them correctly to the Visual Element.

      To set this up, you use something called the StartingAnimation parameter in C# code. This parameter will set the animation for the system to pick the first frame of the animation, which Spine uses to determine the initial size or "artboard" size.
      For example, if you choose an animation that starts at 50% of its full size, Spine will use this as the reference size. When the animation scales up to 100%, it will appear twice as big compared to its starting size, as shown in the picture.

      We have therefor chosen to have a “default” animation with keys on scale 100% to use as our StartingAnimation and override the animation immediately with AnimationState.SetAnimation.

      @pjarnfelt Thanks for the additional info. This explains the issue you're having, thanks for reporting. We will see that it's possible to define the bounds once (e.g. by selecting a different animation temporarily and hitting a button) and then keep using them.

      un mois plus tard

      @pjarnfelt We have just added the above feature, see the github issue ticket comment here.

      Note that the changes require Unity 6000.0.16 or newer (for this serialization bugfix if your set Culture uses comma as decimal separator) and spine-unity 4.2.82 or newer.

      Sorry for the long wait.