Guest User

Untitled

a guest
May 26th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. @IBOutlet var sceneView: ARSCNView!
  2. private var gSession :GARSession!
  3. private var arAnchor :ARAnchor!
  4. private var garAnchor :GARAnchor!
  5. private var rootRef :DatabaseReference!
  6.  
  7. override func viewDidLoad() {
  8. super.viewDidLoad()
  9.  
  10. self.rootRef = Database.database().reference()
  11. self.sceneView.autoenablesDefaultLighting = true
  12.  
  13. // enable the arcore session
  14. self.gSession = try! GARSession(apiKey: "PutYourOwnAPIKeyHere", bundleIdentifier: nil)
  15.  
  16. // Set the view's delegate
  17. sceneView.delegate = self
  18. self.gSession.delegate = self
  19. self.gSession.delegateQueue = DispatchQueue.main
  20.  
  21. sceneView.session.delegate = self
  22. // Create a new scene
  23. let scene = SCNScene()
  24. // Set the scene to the view
  25. sceneView.scene = scene
  26.  
  27.  
  28. }
Add Comment
Please, Sign In to add comment