Is there any way to disable the live camera feed and pass the custom video as input in ARSession? I want to achieve Record & Replay ARSession by code.
There you go :)
var originalSource: if originalSource == nil || scene.background.contents as? UIColor != UIColor.black
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
if originalSource == nil {
originalSource = sceneView.scene.background.contents
sceneView.scene.background.contents = UIColor.black
} else {
sceneView.scene.background.contents = originalSource
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With