Created
June 6, 2018 16:21
-
-
Save azamsharp/c634034a82cbfd6d064ab09fdbede98e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func viewWillAppear(_ animated: Bool) { | |
super.viewWillAppear(animated) | |
// Create a session configuration | |
let configuration = ARImageTrackingConfiguration() | |
guard let referenceImages = ARReferenceImage.referenceImages(inGroupNamed: "AR Resources", bundle: nil) else { | |
fatalError("Missing expected asset catalog resources.") | |
} | |
configuration.trackingImages = referenceImages | |
// Run the view's session | |
sceneView.session.run(configuration) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment