【发布时间】: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