Im trying to Rig an Avatar for VR using the Animation Rigging at runtime. The avatar is from readyplayer.me, which is downloaded at runtime and therefore im adding the rigbuilder and rig at runtime. The procces im doing is adding rigbuilder component from script to the avatar and then instantiating a prefab with the rig component attached to it which includes the three gameobjects for head,lefthand,righthand, and targets for each hand as child. They are instantiated and added inside the avatar gameobject but I have not been able to make it work.
I have tried using the unbindAllStreamHandles and resolveallstreamhandles also for scenehandles, and everytime the rigbuilder.build is called I get a bunch of these two errors:
System.InvalidOperationException: The TransformStreamHandle cannot be resolved.
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007fff1b7f3778 (47c5c04835053e551ad20bee81c6d24) [AnimationRuntimeUtils.cs:302] UnityEngine.Animations.Rigging.AnimationRuntimeUtils.PassThrough
0x00007fff1b7f1808 (47c5c04835053e551ad20bee81c6d24) [unknown:0] UnityEngine.Animations.ProcessAnimationJobStruct`1<UnityEngine.Animations.Rigging.MultiParentConstraintJob>.Execute
And this
System.InvalidOperationException: The TransformStreamHandle cannot be resolved.
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007fff1b752801 (be665d2765ff37313377cc5cf54e7a1) [unknown:0] UnityEngine.Animations.TransformStreamHandle::UnityEngine.Animations.TransformStreamHandle.SetLocalTRS
0x00007fff1b7523f7 (be665d2765ff37313377cc5cf54e7a1) [RigSyncSceneToStreamJob.cs:49] UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob/TransformSyncer::UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob.TransformSyncer.Sync
0x00007fff1b7512dc (be665d2765ff37313377cc5cf54e7a1) [unknown:0] UnityEngine.Animations.ProcessAnimationJobStruct`1<UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob>.Execute