2D Inverse Kinematics not working on device after upgrading Unity to 2022

Hello!

We have a 2D sprite of a pet fox in our game, that is animated by using Unity’s 2D Animation package. Its tail is animated with inverse kinematics chain.

We had no problems with this on Unity 2021. We have just upgraded Unity to 2022.3.9f1 now and all packages. The animations work as intended in Editor without issues, but once built and installed on Android, inverse kinematics stop working and throw some warnings and errors (see pictures). We spent past almost two weeks trying to solve this issue in different ways, but nothing has worked.

Two times we somehow managed to do something, that ended with “no errors” “working tail” build, but after trying to replicate it on other computer, the same steps as before, the resulting build had errors again (one time we just removed and re-added both 2D Animation and PSD Importer packages, the other time we downgraded 2D Animation package and removed and re-added inverse kinematics components on prefab objects).

I suspected the problems had something to do with cache, but clearing both project’s and Unity’s cache didn’t help. Other team member thought there was some issue with package’s scripts and #if UNITY_EDITOR conditions, that made it work properly in Editor but not in build, but we had no idea what and how could we solve that.

Maybe it is relevant to say, that after upgrading Unity and Unity’s Collections package, we got many (200+) errors about collections cache and had to clear Library folder for regeneration to fix this (each team member had to do this). 2D Animation is using Collections package, so I wanted to mention this occurrence.

Can someone please help or suggest some more steps we could try to solve this?


Since I wasn’t getting errors, I don’t know if it’s the exact same issue, but I was finally able to resolve mine by adding this to the link.xml file:

<assembly fullname="Unity.2D.IK.Runtime">
    <type fullname="UnityEngine.U2D.IK.IKManager2D"/>
    <type fullname="UnityEngine.U2D.IK.LimbSolver2D"/>
</assembly>

You could also try the entire assembly, which also worked for me, but the above was a more surgical strike on my use case:

<assembly fullname="Unity.2D.IK.Runtime" preserve="all"/>

I ran on something similar after upgrading from Unity 2021 to Unity 6.

I had no problems on editor, not even on iOS but on only on Android, my 2D character with rig stopped working without error or warning.

I tried @JellyBay solution because I found out that Unity unified 2D.IK package inside 2d.animation. I thought it could be the striping but nothing worked.

5 days after, somehow I found out a warning “Leg_R is using a shader without GPU deformation support. Switching the renderer over to CPU deformation.”
This info leaded me to check ProjectSettings->Player->GPU Skinning and found out that was set to “GPU (Batched)”. After changed it to “CPU Skinning” it seems to finally animation works again on Android.

I hope this info can help, I was so lost on this behaviour after updating to Unity 6