Why OnAnimatorIK is not working properly?

Hello there,

I am just trying to get this working, but it is not being called by Unity.

private void OnAnimatorIK(int layerIndex)
{
Debug.Log(“OnAnimatorIK”);

}

the c#~script is on the same component where the animator is. I tested it out using Unity 2021, 2022 and it is not working yet. (different Humanoid avatars)

Just created a simple scene, with no more logic, just an animator, avatar and this c# script and not working yet.
Any suggestion or advice? Thanks for your time.

Did you enable the IK Pass in your layer in the animator controller?

Oh, Thank you.

I did it at the animation level (see the image), marking Foot IK. I thought that was enough, but I was wrong.
8177354--1064744--upload_2022-6-2_18-21-57.png

It is working now. Thanks again.
8177354--1064747--upload_2022-6-2_18-23-23.png

1 Like

I have this issue since updating to Unity 2021.2.14f1. It affects all projects and OnAnimatorIK no longer works. And yes, IK pass is enabled in base layer.