I'm working on app that should use camera preview
as background for SceneView
. I'm trying to set it like this:
scene.background.contents = AVCaptureDevice.default(for: .video)!
Application already has granted permission to use camera. But video is not displaying, and in the console I see:
[SceneKit] Error: Could not get pixel buffer (CVPixelBufferRef)
What can be the cause of this?