08: The Great Escape (Part 1)
Learning Target
- Create your own environment (not a template)
- Set up a VR player (XR Origin)
- Use the XR Device Simulator to test everything
- Setup the ability to teleport around your scene using the controllers
Resources
Video Tutorial for basic setup:
Ignore the video instructions after 4:35. We will use a pre-built camera rig rather than building our own.
Instructions
Part 1 – Project Setup
Step 1: Create a New Project
- Create a new Universal 3D Unity project

- Name something like
VR_EscapeRoom_YourNameand save it on your workstation to speed up workflow
NOTE: Don't forget to backup your project at the end of each period using the Quick Backup Utility.
Step 2: Install Required Packages
Open Window → Package Management → Package Manager
I highly recommend maximizing this window to avoid confusion.

Click on the Unity Registry so you can see available packages.

Use the search bar to find and install:
- XR Interaction Toolkit
- XR Plugin Management
- Input System (if not already installed)
You will also need to import these two Samples for the XR Interaction Toolkit:
- Starter Assets
- XR Device Simulator


Step 3: Enable XR Support
Go to:
- Edit → Project Settings → XR Plugin Management
Enable the OpenXR plugin.

You will likely see an installation occur in the background.
Step 4: Project Validation
The project validation window will likely open with warnings. If this doesn't happen automatically, then go to
-
- Project Settings → XR Plugin Management → Project Validation
Click the Fix All button to attempt automatic fixes.
Or, click the individual Fix buttons if this doesn't work.
However, be patient. It may take some time to apply some fixes.
You will likely still have one warning, Click the Edit button to continue.

Add the Oculus Touch Controller Profile:

Part 2 – Create the Player
Step 1: Add XR Origin
In the Hierarchy:
- Delete the existing Main Camera

- Add XR → XR Origin (VR)

The camera we will use is a child of this object
Step 2: Add XR Device Simulator
Find this folder:
- Assets → XR Interaction Toolkit → 3.x.x → XR Device Simulator
Drag the XR Device Simulator prefab into your scene.

This allows you to test VR without a headset.
Step 3: Verify Simulator Controls
Test in Play Mode:
- Right-click + mouse → look around
- WASD → move
- Shift / Space → simulate controllers
- Mouse → move controller position
Tips:
- TAB → quickly cycles between headset, left and right controllers
- RIGHT MOUSE → look around while using the controllers
- Switch to the headset to move around with WASD
You should be able to:
- move the camera
- see simulated controller movement

Part 3 – Design Your Escape Environment
Create a unique simple room or other contained environment.
You are encouraged to find assets from the Asset Store to make this process faster.
Requirements for now:
- A floor (scaled correctly)
- At least 3 walls or boundaries
- Lighting (Directional and at least one of Point, Spot, Area)
- At least 5 objects in the scene
Examples:
- small room
- lab space
- workshop
- puzzle chamber
Part 4 – Add More Controller Capabilities
Though we can build up and configure an XR Rig ourselves in the hierarchy, this can take quite a bit of time to setup and configure. Let's do this the easier way.
Find the XR Origin (VR) item in the scene and completely delete it.
Find this folder:
- Assets → XR Interaction Toolkit → 3.x.x → Starter Assets → Prefabs

The most important thing is that most of these are already configured for us! Yay!
Part 5 – Teleport Around Your Scene
Select whatever object represents your floor and add this component:
- Teleportation Area
Then, be sure to drag in your XR Interaction Manager

Next, we need to add some target locations where we are allowed to teleport.
Add a cube as a child of your floor. Give it a good name.

Then, add this component to it:
- Teleportation Anchor
Once again, be sure to drag in your XR Interaction Manager

Resize the anchor so it is just a thin pad sitting just above the floor.
Move the anchor to a location where you would like to be able to teleport.

Part 6 – Test Your Teleport
Run your game and turn until you can see the anchor.
Activate your left or right controller (T, Y) and move the interaction ray until it is near the anchor.
Press G. You should see the ray bend to touch the anchor. If not, try again with the ray closer to the anchor.
If it doesn't work after a couple tries, something is probably not setup correctly.
Be sure you remembered to drag the XR Interaction Manager into your new components.
When you release G, you should teleport to the anchor!
Grading
| Criteria | Letter Grade |
|---|---|
|
Extended
|
A+ |
|
Exceptional
|
A |
|
Good
|
B |
|
Reasonable
|
C |
|
Needs Improvement
|
D |
|
Insufficient
|
F |
| Scores may be rounded to the nearest whole number. | |