Swift 有没有办法检查设备是否有 LiDAR 传感器?不幸的是,我在苹果官方纪录片和互联网搜索中都没有找到任何信息。
我当前的解决方法是确定设备类型,如本文中所述:如何确定当前的iPhone/设备型号? https://stackoverflow.com/questions/26028918/how-to-determine-the-current-iphone-device-model
Thanks
使用此代码:-
import ARKit
let supportLiDAR = ARWorldTrackingConfiguration.supportsSceneReconstruction(.mesh)
guard supportLiDAR else {
print("LiDAR isn't supported here")
return
}
场景重建需要带有激光雷达扫描仪的设备,例如第四代iPad Pro。
参考:-https://developer.apple.com/documentation/arkit/arworldtrackingconfiguration/3521377-supportsscenereconstruction https://developer.apple.com/documentation/arkit/arworldtrackingconfiguration/3521377-supportsscenereconstruction
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)