Skip to content

Instantly share code, notes, and snippets.

@Ingelheim
Created April 15, 2018 14:16
Show Gist options
  • Save Ingelheim/500895c96ed7fe5b28a48adc21e29f0c to your computer and use it in GitHub Desktop.
Save Ingelheim/500895c96ed7fe5b28a48adc21e29f0c to your computer and use it in GitHub Desktop.
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
guard let referenceImages = ARReferenceImage.referenceImages(inGroupNamed: "Mona Lisa Room", bundle: nil) else {
fatalError("Missing expected asset catalog resources.")
}
let configuration = ARWorldTrackingConfiguration()
configuration.detectionImages = referenceImages
sceneView.session.run(configuration, options: [.resetTracking, .removeExistingAnchors])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment