• RuntimesUnityBugs
  • Problem with Spine assets since update on 24/01/24.

Dear Support.
I am trying to import spine assets into Unity like I have done many times before. Unfortunately it seems since the update that these have issues. If I import the asset and then try to create a Skeleton Graphic UI object in the normal manner, I am presented with an infinite loop of this error whilst the object is in the scene :
Invalid AABB inAABB
UnityEngine.UI.Graphic:Rebuild (UnityEngine.UI.CanvasUpdate)
Spine.Unity.SkeletonGraphic:Rebuild (UnityEngine.UI.CanvasUpdate) (at Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs:314)
UnityEngine.Canvas:SendWillRenderCanvases ()

I have confirmed that I can still import previous versions of spine assets without issue. I have also ensured I have the latest version of the spine-unitypackage : https://esotericsoftware.com/files/runtimes/unity/spine-unity-4.1-2024-01-24.unitypackage.
Please can you advise how I can resolve this?

Kind regards
Andrew Garbett

Related Discussions
...

@Crux Sorry for the troubles. Unfortunately we could not reproduce this issue, everything worked as desired on our end. Could you please send us a minimal version of the problematic Spine project (including the attachment images) which no longer imports correctly in Unity? You can send it to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context.

I have confirmed that I can still import previous versions of spine assets without issue.

Did you try exporting the problematic skeleton project from an older Spine Editor version? Or did you just check different skeleton projects which were exported in older Spine Editor versions in the past?

I have a feeling that the problem is unrelated to the Spine Editor and spine-unity versions and depends mainly on the skeleton project setup. Whatever the cause, it would be great if you could send us your reproduction project since we would be happy to fix this issue.

    Harald
    This also happens to us when a SkeletonGraphic in UI is created far off screen and then moved on screen with characters that have physics constraint applied to the spine. We fixed it by applying the following options to the constructed SkeletonGraphic object:

    skeletonGraphic.applyRotationToPhysics = false;
    skeletonGraphic.applyTranslationToPhysics = false;

    It would be super useful if we could apply a scale or max limit to these physics also in the future.

    @bantam Unfortunately we couldn't reproduce this issue either following your description.

    Could you please send us a minimal Unity project which still shows this issue? You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context.

      Harald
      I was able to create a minimum test case successfully and emailed it over, sometimes it crashes the editor or causes an infinite loop and the editor needs to be killed. It gives the Invalid AABB inAABB error OP described. If you construct the SkeletonGraphic programmatically and disable the physics as I described above the issue disappears. If you disable the animation component attached to the SkeletonGraphic the issue does not manifest.

      Also forgot to mention the scene with the bug created is in Assets/Spine/sample.unity

      @bantam Thanks very much for sending the reproduction project! I will have a look at it first thing tomorrow when I'm back at the office.

      @bantam Unfortunately the issue is a bit tricky since the reproduction skeleton's PhysicsConstraint setup is configured so unstable that even light movement (e.g. normal human run velocity) lets the PhysicsConstraints chain bones Coat Right Chain become stretched to absurd dimensions. Sometimes this leads to extremely large mesh bounds (due to extreme stretching) causing Unity problems.

      The intended solution was to limit the Transform velocity that is passed to the skeleton to sane values (to cover "teleportation" at spawning), however with this setup even normal velocities could break the bone hierarchy and subsequently the mesh. The only reliable solution that comes to my mind currently is to disable applyTranslationToPhysics by default at newly spawned skeletons, however users might then eventually still trigger the issue when they enable it in the scene and perform some critical movement.

      Dear everybody

      I think Ive found a work around and something that may point to the root of the issue. When importing assets with this problem (in UI mode only) , they are coming through with NAN values in the Rect transform. :

      https://esotericsoftware.com/forum/assets/files/2024-02-01/1706791389-408085-image.png

      If I change these to zero (have to change the pivot first) , this seems to resolve the problem. I have liaised with the artist who makes the assets in spine and he assures me that everything looks fine as far as spine is concerned. I am wondering if there is a problem with the export at spines end?

      Please let me know if you need any further information.

      Kind regards
      Andrew GarbettDear everybody

      I think Ive found a work around and something that may point to the root of the issue. When importing assets with this problem (in UI mode only) , they are coming through with NAN values in the Rect transform. :

      https://esotericsoftware.com/forum/assets/files/2024-02-01/1706791389-408085-image.png

      If I change these to zero (have to change the pivot first) , this seems to resolve the problem. I have liaised with the artist who makes the assets in spine and he assures me that everything looks fine as far as spine is concerned. I am wondering if there is a problem with the export at spines end?

      Please let me know if you need any further information.

      Kind regards
      Andrew Garbett

        Crux I think Ive found a work around and something that may point to the root of the issue. When importing assets with this problem (in UI mode only) , they are coming through with NAN values in the Rect transform. :

        Thanks for the additional info. Could you please send us your problematic Spine project (including the attachment images), then we can have a look at what exactly is leading to the NAN values. You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context.

        1 个月 后

        @Crux @bantam FYI: This issue should now be fixed via the very recently added Limits property of Physics Constraints. This prevents bones from stretching to absurd dimensions, thus preventing infinitely large mesh bounds crashing Unity.

        Please be sure to export your skeleton from the latest Spine 4.2-beta version and use the latest spine-unity 4.2-beta runtime, available for download here as usual:
        https://esotericsoftware.com/spine-unity-download