【问题标题】:AR Kit 3: SupportsFrameSemantics() is returning false on supported iOS deviceAR 工具包 3:SupportsFrameSemantics() 在支持的 iOS 设备上返回 false
【发布时间】:2019-12-03 12:26:37
【问题描述】:

我正在使用运行 iOS 13.2.3 的 iPhone 11。

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());
    }

【问题讨论】:

  • 今天遇到同样的问题,找到答案请留言。

标签: ios iphone xamarin.ios augmented-reality arkit


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-02
    相关资源
    最近更新 更多