I tried creating the two views in a view controller, and running them at the same time, but that doesn't work, the ARView overtakes ARSCNView, even if it's not hooked up to an outlet. I then tried adding one view to the other, and that doesn't work either.
@IBOutlet var arView: ARView!
@IBOutlet var sceneView: ARSCNView!
This works on its own for ARView:
let anchor = try! Glasses.loadScene()
arView.scene.anchors.append(anchor)
arView.session.run(ARFaceTrackingConfiguration())
This works on its own for ARSCNView, and then I track everything in the delegate functions
sceneView.session.run(ARFaceTrackingConfiguration())
sceneView.delegate = self
This does not work:
let ar = ARSCNView(frame: view.frame)
ar.delegate = self
ar.session.run(ARFaceTrackingConfiguration())
arView.addSubview(ar)
This does not work:
let ar = ARView(frame: view.frame)
let anchor = try! Glasses.loadScene()
ar.scene.anchors.append(anchor)
ar.session.run(ARFaceTrackingConfiguration())
sceneView.addSubview(ar)
When I tried adding one view to the other I commented out the session.run calls, but that didn't make a difference.