I am using this code in ARFoundation 4.0.6 to detect if face detection is possible:
var descriptors = new List<XRFaceSubsystemDescriptor>();
SubsystemManager.GetSubsystemDescriptors(descriptors);
if (descriptors.Any()) _faceTrackingDescriptor = descriptors.First();
This works fine on my iPhone X.
But since I upgraded all ARFoundation packages to 4.1, no face tracking descriptors can be found anymore. The list is empty.
What might be the reason for this? I cannot find any changes regarding face tracking in the change logs.
I just found out what the root cause is: The newer ARKit package adds a new option to the ARKit project settings: “Face Tracking”. This has not been enabled by default. After I ticket the box, the descriptor becomes available.