XR Step-by-Step 2024! Meta Quest: Setting up your Meta Quest XR Project! Meta XR All-In-One SDK (v66)

Virtual Reality (VR), Augmented Reality (AR), Mixed Reality (MR) and now Spatial Computing all come together as XR or “Extended-Reality”.
You’re in the right place at the right time to build something amazing in XR!

In this blog post series we will focus on Meta Quest!

Check out other blog articles in this (and other) series!
Quick links to Lance’s latest XR Step-by-Step blog articles by device

Here is where we begin our XR experience journey! You should have the tools you need installed – if not, see the previous blog article in this series. We’ll be setting up a completely new XR experience, from beginning to end. This may seem like a lot, but take it one section at a time – the payoff is well worth it…

Full Step-by-Step Instructions!

Goals…

  1. Create a New Project
  2. Setup Unity Environment
  3. Adding Meta XR All-In-One SDK
  4. Configure Project
  5. Configure for Building on Android
  6. Setting up our XR Scene
  7. Setup our “Hello Cube!”
  8. Build and Run

Download the finished code for this blog article @ Github Repo

Creating a New Project

Let’s start by creating a new Universal 3D project in Unity Hub with our latest version of Unity.

  • Open Unity Hub and click New Project
  1. (New Project Window) -> Editor Version
  2. Select the latest version of 2022 in the drop down
  • (New Project Window) If you DO NOT have the Universal 3D template already installed
    1. (Templates) Click the Universal 3D template
    2. Click Download template
  • (New Project Window)
    1. (Templates) Click the Universal 3D template
    2. (Project Name) Name your XR project
    3. (Location) Pick the directory in which you want the project to be created
    4. (Project Settings) Unclick the Connect to Unity Cloud (not using it in this project)
    5. Click Create Project

Setup Unity Environment

Now that we have a new project lets see what the Unity environment looks like and configure the layout.

  • Creating a project takes a couple of minutes – as the base projects are pretty large (~1.2GB) — here’s what we get!

<Pro-Tip>

  1. (Toolbar) Window -> 2. Layouts -> 3. Wide
  2. There are several different layouts of your Unity windows, I prefer “Wide” layout – but find the one that you love!

</Pro-Tip>

  • So we’re all talking about the same things, here are the parts of the Unity Window

Adding Meta XR All-In-One SDK

What a difference a year makes – looking back at last years how to build a Meta Quest XR experience there were a LOT more steps. This year, Meta has released the Meta XR All-in-One SDK which speeds up our development by leaps and bounds — here’s how to install it.

  • Open up the Unity Asset Store — https://assetstore.unity.com/ and search for “Meta XR All in one” and you will find the following.
    • If for some reason you can’t find it – here’s the direct link to Meta XR All-in-One SDK
    • IMPORTANT NOTE – we are using v66 (latest at the time of writing this series) – between versions you will likely find changes — ie. where things are, what they are called, new blocks, some blocks depreciated. Will keep things as up to date as possible 🙂
  • As long as you’re logged in to the website, click -> Add to My Assets
  • Accept the License Agreement
  • Click Open in Unity
  • Click Install
  • Up to you, but I generally share my usage with Meta to make the products better (this may or may not come up for you)
  • Click on Restart Editor

Now the new Meta All-in-One SDK is added to your project!

Configure Project

Next we need to setup the project to run on our Oculus Meta headset using the new Meta XR configuration wizard, that makes it a lot easier to make sure we don’t miss any settings – huge improvement of the way we did this in the past.

  1. Click the Meta icon in bottom right corner
  2. Click Project Setup Tool
  1. (Project Settings) Click XR Plug-in Management
  2. Click Install XR Plugin Management

A couple pop-up boxes may appear, and one will likely ask you to restart the app – do so

  1. (Project Settings) Click XR Plugin-in Management
  2. Click the Windows, Mac, Linux settings tab
  3. (Windows, Mac, Linux settings tab) Click Oculus checkbox
  1. Click the Android tab
  2. Click Oculus
  1. (Project Settings) Click XR Plug-in Management -> Oculus
  2. (Android tab) Click the Oculus 3 checkbox
  1. (Project Settings) Click Meta XR
  2. (Project Setup Tool) Click the Android settings tab
  3. (Android settings tab) Click Fix All
  4. (Android settings tab) Click Apply All
  • Should end up with everything fixed/applied
  1. (Project Setup Tool) Click the Windows, Mac, Linux settings tab
  2. (Windows, Mac, Linux settings tab) Click Fix All
  3. (Windows, Mac, Linux settings tab) Click Apply All (if needed)
  • Should end up with everything fixed/applied
  • (Android tab) Do the same, Fix All and Apply All

Configure for Building on Android

Unity can be used to build across a wide variety of devices, we need to change it to build for Android – which is the hardware running in the Meta Quest.

  1. (Toolbar) Click File
  2. (File) Click Build Settings…
  • (Build Settings) -> Platforms -> Click Android
  • (Build Settings) -> Click Switch Platform

Setting up our XR Scene

We’ve done all the configurations! Woohoo way to go 🙂
Now we want to start setting up our scene. Think of a scene as a level in a game -or- the stage on which we will adding scenery for our play – including the camera through which we will view the stage.

We need to start by cleaning up our scene, and deleting the old Main Camera and Global Volume

  1. (Hierarchy) Click Main Camera -> hit the DEL key to delete it!
  2. (Hierarchy) Click Global Volume -> hit the DEL key to delete it!
  • You should be left with just Directional Light

Let’s look at all the new Building Blocks!

Wow – this approach has made adding features to our Meta project so much easier – and as new features are rolled out they’ll just keep adding more blocks!

  1. Click the Meta icon in bottom right corner
  2. Click Building Blocks
  • (Building Blocks) Click the Add Block for the Camera Rig
    • This will add a new Camera Rig directly into our Hierarchy – it has a ton of already added features that we can explore more in-depth in future tutorials — but know that not long ago we needed to setup all this one piece at a time. Look back at previous year’s XR Step-by-Step tutorials if you’re so inclined — that or live in the NOW and just click the button to add it. 🙂
  • (Building Blocks) Click the Add Block for the Controller Tracking
    • We want to be able to see our controllers and use them to grab objects!
  • (Building Blocks) Click the Add Block for the Grab Interaction
    • That’s right we’re making “hello cube” and “this is the cube you’re looking for”!
  • Note!
    • Adding some blocks brings in other blocks they need!
    • This is really the power of using block, it speeds up our project setup by a lot!!
    • (Hierarchy) Click Camera Rig -> (Inspector) See everything that Grab Interaction brought in…
      • Controller Interactions
      • Virtual Hands
      • Interaction
      • Hand Tracking
      • Hand Interactions
      • …and of course Grab Interaction

<Pro-Tip>

  • It’s hard to see your objects in the scene with what Unity calls Gizmos (like the giant white camera icon) over the top of them. Click the Gizmo icon at the top right of the Scene Window to turn them off.
  • Now we can see everything!

</Pro-Tip>

  • Always after adding Building Blocks we want to check our Project Setup Tool to see if there are any fixes we need to apply.
  1. Click the Meta icon in bottom right corner
  2. Click Project Setup Tool
  • (Android tab) Click Apply All

Setup our “Hello Cube!”

….Yes, my version of “Hello World!”
We have most of what we need but let’s color our cube and make put it where we can grab it!

  • (Hierarchy) Double-Click on Cube
    • The scene should zoom in on the cube and you should see that it’s pink?!? Pink in this case means that it doesn’t have a material applied.
    • Let’s make a new red colored material and paint our cube with it!
  • We want to start by creating a new folder for our materials named “_Materials”
    • Noting I put an “_” character in front of the folders that I want to at the top of the list of folders
  1. (Project) Right-Click in the file section -> 2. Create -> 3. Folder
  1. (Project) Click on the _Materials folder
  2. (Project) Right-Click in the file section -> 3. Create -> 4. Material and name in Red
  1. (Project) Click our new material Red
  2. (Inspector) Click Base Map
  3. (Color) Move the circle to a shade of red that you like!
  • (Project) Just drag the Red material onto the pink cube and it should turn red 🙂
  1. (Hierarchy) Click Cube
  2. (Inspector) -> Transform -> Position -> Change Y to 1
  3. (Inspector) -> Transform -> Position -> Change Z to 0.6
  4. (Hierarchy) Double-Click Cube to see it’s new position in the scene
    • We’re doing this so when we run the application that the cube is in raised up in front of us and we can grab it!
  1. (Hierarchy) Click on Camera Rig
  2. (Inspector) OVR Manager (Script) -> Click Quest 3 checkbox

Build and Run

Let get this running on our device!

  1. (Toolbar) Click File
  2. (File) Click Build Settings…
  1. (Build Settings) Click Run Device -> If your Quest is connected to your computer, and you’ve given it permissions – you should see your device
  2. (Build Settings) Click Build and Run
  • You need to choose where you want to build your file to…
  • I generally create a “_Builds” folder at the same level in the file structure that you saved your project to – and then name the build file “App”
  1. (File Explorer Window) Create a new folder “_Builds” and under that create another folder matching the name of your project, so “QuestXR” in this case
  2. (File Explorer Window) -> File name -> Enter “App” as the name
  3. (File Explorer Window) -> Click Open

Success!

Look at that! You’ve built “Hello Cube!” and you’re seeing it on your Quest!!!
Congratulations for all your hard work – you’re now part of a very select group of geeks that have build their very own XR experience. 🙂

  • Note, you should also see your HANDS and be able to grab things the same way you can with the controllers!!!

I always love feedback and suggestions for new XR / AI blog posts!

Go build something amazing in XR & AI! — Lance 🙂

Check out other blog articles in this (and other) series!
Quick links to Lance’s latest XR Step-by-Step blog articles by device

Leave a Reply