AR 套件 3:SupportsFrameSemantics() 在受支持的 iOS 设备上返回 false

AR Kit 3: SupportsFrameSemantics() is returning false on supported iOS device

我正在使用 iPhone 11 使用 iOS 13.2.3.

Xcode 11.2.1

Xamarin.iOS V13.6.0.12

尽管 API 调用说不支持,但人物分割确实成功,这很奇怪。我需要能够检测每个设备是否支持它来处理不支持 arkit 3 人类遮挡的设备。

还有其他人遇到同样的问题吗?

    public override void ViewDidLoad()
    {

        base.ViewDidLoad();

        // All returning false
        Debug.WriteLine("Person Segmentation Supported: " + ARWorldTrackingConfiguration.SupportsFrameSemantics(ARFrameSemantics.PersonSegmentation));
        Debug.WriteLine("Person Segmentation Depth Supported: " + ARWorldTrackingConfiguration.SupportsFrameSemantics(ARFrameSemantics.PersonSegmentationWithDepth));
        Debug.WriteLine("Body Detection Supported: " + ARWorldTrackingConfiguration.SupportsFrameSemantics(ARFrameSemantics.BodyDetection));

    }

    [Export("renderer:didAddNode:forAnchor:")]
    public void DidAddNode(ISCNSceneRenderer renderer, SCNNode node, ARAnchor anchor)
    {
        // Returns false
        Debug.WriteLine("Supported? " + ARWorldTrackingConfiguration.SupportsFrameSemantics(ARFrameSemantics.PersonSegmentationWithDepth));

        // Create AR config with Person Segmentation added
        var configuration = new ARWorldTrackingConfiguration
        {
            PlaneDetection = ARPlaneDetection.None,
            LightEstimationEnabled = true,
            FrameSemantics = ARFrameSemantics.PersonSegmentationWithDepth
        };

        // Runs the session and the feature works on iPhone 11 regardless of SupportsFrameSemantics(ARFrameSemantics.PersonSegmentationWithDepth) == false
        ARView.Session.Run(configuration, new ARSessionRunOptions());
    }

https://github.com/xamarin/xamarin-macios/issues/9271 我已经在 xamarin 的 github 上打开了问题单。请参阅 Whitney 的评论以了解变通方法,她也打开了一个 PR,因此希望很快将其包含在更新中。