unity – Why does ‘InvalidCastException: Specified cast is not valid.’ occur for ARKitFaceSubsystem?


Why does ‘InvalidCastException: Specified cast is not valid.’ occur for ARKitFaceSubsystem in the snippet below?

    var faceManager = FindObjectOfType<ARFaceManager>();
    if (faceManager != null)
    {
        m_ARKitFaceSubsystem = (ARKitFaceSubsystem)faceManager.subsystem;
    }