如何在保持 LiDAR 调试网格的同时禁用摄像头馈送?

How to disable camera feed while keeping LiDAR debug mesh?

我是 运行 一个 iOS14 ARSession 在支持 LiDAR 的设备上,并让它输出它在相机馈送上动态创建的网格覆盖。

是否可以禁用 ARView 或 ARSession 的摄像头源,同时仍然看到调试网格覆盖?

这是我显示网格叠加层的方式:

arView.debugOptions.insert(.showSceneUnderstanding)

我想看到的:黑屏,彩色线条代表网格顶点和面。

是的,可以在仅保留 LiDAR 调试网格的同时禁用摄像头馈送:

@IBOutlet var arView: ARView!

arView.environment.background = .color(.black)

...如果您需要获取相机反馈,只需使用:

arView.environment.background = .cameraFeed()