My character controller is set up such that the animator is a child of the root object. Trying to set up the rig builder on the child, throws an error that prompts me to put the rig builder component on the root GO. By default, it requires the animator to be present there also, but overriding this and manually referencing the (child) Animator component, throws a number of “PropertyStreamHandle cannot be resolved” errors.
Is it currently possible to use animation rigging with such a setup? If so, how do I set this up?
The RigBuilder is only meant to work when it is on the same GameObject as the Animator. This should be enforced by the [RequireComponentTypeof()] attribute at the top of the RigBuilder component. Things will break when you are overriding the reference. However, it should be possible to set up a RigBuilder + Animator any where in the hierarchy.
You can verify this by grabbing the Animation Rigging samples from the package manager. For any of the sample scenes you should be able to create an empty gameobject and child the root gameobject to it. The sample should still work the same after this.
To help you better it would be great to have some more information. Could you specify what the error is you are getting when you have a setup with the rigbuilder on the child? We have had a bug with this in the past but it should be fixed in recent versions. Could you also provide us with the Unity version and Animation Rigging version (which can be found in the package manager) you are using?
I find it happens specifically when using animators using an avatar setup. If I initialize the rig on the root, and then reparent it to a different root transform, the problem doesn’t occur. I suspect the error has something to do with the avatar rebuilding process, which expects the animator to be in the root.
This is triggered because animation job handles in animation rigging are adding additional Transforms to the stream which were not in the original avatar. To work around this for now, you can try regenerating a generic avatar (that is considering you have a generic rig) like so: