FaceMeshVisualizer (the actual generated face mesh) fails to appear with prefab

I have an application which can spawn props which are properly tracked (like hats, glasses). However, the face mesh itself fails to appear.

Within the prefab, I have these components:
(prefabRoot):

  • ARFace

  • ARFaceMeshVisualizer

  • MeshFilter

  • (children gameobjects)

The children of this prefab root comprise the passive meshes of whatever “head prop” I chose.

To my knowledge, if a MeshFilter component is present on the same GameObject, ARFaceMeshVisualizer should create a mask which morphs/matches to my IRL face. However, in this case, no mesh appears, and there are no associated null reference error messages to clue me in on what may be going on.

What other things can I check for, when it comes to debugging why a face mesh doesn’t appear on an object with ARFaceMeshVisualizer on it? The prefab which should induce the generation of the face mesh clearly follows the transform of the face, and this prefab is listed as a “Face Prefab” of ARFaceManager, but the face mask itself just… doesn’t render?

Where else should I consider sticking the breakpoints to see why this isn’t working?

Any clues on how I’d even begin to debug this situation? I’ve been unable to move past this point.

I’ve tried putting a MeshFilter component on the prefab, as well as a mesh renderer. Is a mesh collider what is needed? I just cannot seem to get the face mesh to appear.

I’ve partially implemented this, with some caveats.

Clearly, the ARFaceMeshVisualizer needs to be placed on the same gameObject as the ARFace component. Since each ARFace is created dynamically in my app, I did a rather inefficient _face.gameObject.AddComponent() and such. However, I got a warning “Can’t add component ‘MeshRenderer’ to ARFace” as if it was already added. However, if I comment the line out, I get a null reference error when I attempt to assign the material. In the former case, I properly see the face mesh appear, and can assign materials to it.

It’s been narrowed down, but it’s still a tad confusing!

Dang, guys! It looks like the Unity-related news has made everyone’s hands full, so I’ll modify the question to make it super easy:

Outside of “AR Foundation Samples” what github repositories can I look at which implement face tracking in a dynamic way? Specifically, I would like to see examples where the “AR Face” component is dynamically referenced as it’s generated on face detection, instead of existing statically on a prefab. I think the clue lies there.

AR Foundation Samples is currently the only repository that Unity maintains with any face tracking samples, but of course there may be a community solution out there somewhere that meets your needs.