My long and detailed tutorial on how to use Spatial Anchors while developing for your Oculus Quest in Unity! With them, you can create experiences that can have a consistent and persistent mapping between the real world and the virtual world.
---
Source codes
SpatialAnchorsManager v1 (Creation of objects with controllers):
https://pastebin.com/SGdtjYSy
SpatialAnchorsManager v2 (Creation of objects associated with anchors):
https://pastebin.com/tSRtpDAX
SpatialAnchorsManager v3 (Objects anchored to anchors in every condition):
https://pastebin.com/XQfEZat5
SpatialAnchorsManager v4 (Persistent anchors with load/save):
https://pastebin.com/t2uRqepk
SpatialAnchorsManager v5 (Persistent anchors with load/save/erase all):
https://pastebin.com/mrFb2qye
---
Useful Links
Documentation on Spatial Anchors:
https://developer.oculus.com/experime...
Tutorial on how to create a simple app for Oculus Quest:
https://skarredghost.com/2021/02/04/h...
Tutorial on how to implement passthrough in your Oculus Quest app:
https://skarredghost.com/2021/10/01/h...
---
Timecodes:
0:00 Intro
0:05 What are Spatial Anchors
2:45 Unity Project Initialization
8:30 Enabling Spatial Anchors in Unity and on Quest
13:07 Explanation of the demo app
15:18 Step 1: Objects generation with controllers
22:42 Step 2: Spatial Anchors Creation
39:53 Step 3: Objects locked to Spatial Anchors
43:17 Step 4: Load/Save of Spatial Anchors
1:08:38 Step 5: Load/Save/Erase of Spatial Anchors
1:12:26 Step 6: Passthrough and Spatial Anchors
1:19:45 Additional suggestions
1:23:14 Final considerations & Goodbye
---
Follow me for more content about AR and VR:
Blog: https://skarredghost.com
Twitter: / skarredghost
Linkedin: / antony-vitillo-vr
Patreon: / skarredghost (please donate!)
#Unity3d #OculusQuest2 #VirtualReality