Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @IBOutlet var sceneView: ARSCNView!
- private var gSession :GARSession!
- private var arAnchor :ARAnchor!
- private var garAnchor :GARAnchor!
- private var rootRef :DatabaseReference!
- override func viewDidLoad() {
- super.viewDidLoad()
- self.rootRef = Database.database().reference()
- self.sceneView.autoenablesDefaultLighting = true
- // enable the arcore session
- self.gSession = try! GARSession(apiKey: "PutYourOwnAPIKeyHere", bundleIdentifier: nil)
- // Set the view's delegate
- sceneView.delegate = self
- self.gSession.delegate = self
- self.gSession.delegateQueue = DispatchQueue.main
- sceneView.session.delegate = self
- // Create a new scene
- let scene = SCNScene()
- // Set the scene to the view
- sceneView.scene = scene
- }
Add Comment
Please, Sign In to add comment