Get Bone Transform From Avatar With Generic Rig?

Been looking around but can’t seem to find any answers for this…

Is it possible to get the Transform of a bone in an avatar with a generic rig?

I have an object with a generic Animator rig which has “Optimize Game Objects” enabled on it. Is there any way to get the Transform details of one of the bones?

With a humanoid rig you can use Animator.GetBoneTransform( … ) but that doesn’t seem to work for me. I’m guessing because it is a generic rig.

I know I could just turn off “Optimize Game Objects” and have access to the hierarchy, but I was trying to avoid that if possible.

So can this be done? Or do I just need to go the “Optimize Game Objects” route?

Thanks.

You can expose extra bones if needed in your hierarchy. For instance, we use two prop bones that I expose and place prefabs under.