Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 5

Setting Up Meta XR Simulator for In-Editor Testing

Recommended resources

In the last lesson, you constructed the virtual "body" for the user by setting up the XR Origin, complete with its camera and controller objects. You now have a stage (the Plane), a prop (the Cube), and an actor (the XR Origin), but no way to direct the performance. Since you are developing without a physical Meta Quest headset, you need a way to simulate the user's head and hand movements directly within the Unity editor.

This lesson addresses that crucial need by introducing the Meta XR Simulator. This tool is the cornerstone of our development workflow, allowing for rapid iteration and testing using just your keyboard and mouse. You will learn how to install and activate this simulator, understand its basic controls, and use it to navigate the scene you built previously. By the end, you'll be able to "play" your VR scene and verify that your initial setup is working as expected.

1. Two Simulators: Choosing the Right Tool

Before we begin, it's important to clarify a key point. Unity's ecosystem for XR is composed of different packages that sometimes have overlapping features. The XR Interaction Toolkit (XRI), which we've used so far, includes its own "XR Device Simulator." However, since our target platform is Meta Quest, we will use the simulator provided by Meta itself.

The Meta XR Simulator is a dedicated, standalone XR runtime designed to faithfully replicate the behavior of Meta Quest devices. It's included with the Meta XR All-in-One SDK you installed earlier and offers a more specialized simulation environment that will be invaluable as we add more platform-specific features later.

An overview of the Meta XR Simulator, highlighting its role in speeding up development by simulating Meta XR devices with keyboard and mouse inputs directly in the editor.

Think of it as choosing between a generic C++ compiler and a platform-specific one like MSVC for Windows development; while the generic one works, the specialized tool often provides better integration and platform-specific debugging capabilities.


2. Installing and Activating the Simulator

While the necessary package is already in your Unity project, the Meta XR Simulator is also a standalone application that needs to be installed on your computer. Once installed, you can activate it from within Unity, telling the editor to use it as the default XR device when you enter Play mode.

Let's get it set up.

Get Started with Meta XR Simulator

This official documentation from Meta provides the installation files and step-by-step activation instructions.

First, navigate to the Installation section. Use the link corresponding to your operating system (Windows or macOS) to download and run the installer. Once installed, return to Unity. Follow the steps in the next section, Activate Meta XR Simulator in Unity. You will learn how to activate it either by clicking the icon in the toolbar or using the top menu (Meta > Meta XR Simulator > Activate).

To see this activation process in action and get a feel for the interface, the following video provides a clear walkthrough.

How to Make a VR Game WITHOUT a VR Headset

This tutorial from Valem Tutorials demonstrates the entire process of activating and using the Meta XR Simulator.

Watch the segment from enabling the simulator. The presenter shows both methods of activation: clicking the button that appears next to the Play button and using the Meta menu. Ensure you see the "[Meta XR Simulator is activated]" message in your Unity Console to confirm success.

After completing these steps, your Unity editor is now configured to launch the simulator whenever you enter Play mode.


3. Simulating VR with Keyboard and Mouse

With the simulator active, press the Play button at the top of the Unity editor. You will see two windows appear: your standard Game view and a new, separate window titled "Meta XR Simulator". This new window is the simulator's control panel, while the Game view shows what the virtual user sees.

You can now control the XR Origin using your keyboard and mouse. Let's practice the essential controls.

  • Look (Head Rotation): Hold down the right mouse button in the Game view and move your mouse to look around.
  • Move (Player Position): Use the W, A, S, D keys to move your character forward, left, backward, and right, respectively. Use Q and E to move down and up.
  • Controller Actions: The simulator maps controller buttons to your keyboard and mouse. By default:
    • Index Trigger: Left mouse click simulates the right index trigger pull.
    • Grip Button: The U key often simulates squeezing the grip button on the controllers.

The video you just watched also gives a great demonstration of these controls and the simulator's UI.

Meta XR Simulator | Synthetic Environments, Scene Recording & Multiplayer Testing

This overview from XR Dev Rob provides a clear look at the simulator's UI and control scheme.

First, watch the section explaining the simulator UI to familiarize yourself with the settings available in the standalone window. Then, watch the demonstration of basic controls, which shows how to use the keyboard and mouse to move the player and how to switch between controlling the head and hands individually using the bracket keys ([ and ]).

To explore the full list of controls, you can refer back to the Meta documentation. In the simulator window, the Input Bindings tab will show you the complete mapping for keyboard, mouse, and even an Xbox controller if you have one connected.


4. Running Your Scene in the Simulator

Now it's time to put everything together. With the Meta XR Simulator activated, enter Play mode in the scene you created in the previous lesson.

You should see your scene from the perspective of the XR Origin. Try the following:

  1. Use the mouse to look around and center your view on the Cube.
  2. Use the W key to move forward towards the cube and the S key to back away.
  3. Look down to see the Plane you are standing on.
  4. You should also see your controller models in front of you. Try pressing the U key and the left mouse button to see if you can see the hands animate a grip or trigger pull.

If you can successfully navigate your scene in this way, your simulator is configured correctly. You have officially closed the loop on the development cycle: you can now build, run, and test directly in the editor.


Conclusion

In this lesson, you configured the essential tool that bridges the gap between your development machine and a virtual reality experience. You learned about the Meta XR Simulator, distinguished it from Unity's default simulator, and successfully installed and activated it. By mastering the basic keyboard and mouse controls, you were able to navigate your VR scene for the first time, verifying that all the setup pieces from the previous lessons are working together.

Key Takeaways:

  • The Meta XR Simulator is a standalone runtime used for testing Meta Quest applications in Unity without a physical headset.
  • It is activated via the Meta menu or a toolbar icon before entering Play mode.
  • Basic navigation is handled with the mouse (looking) and WASD keys (moving).
  • Controller actions like trigger and grip are mapped to mouse clicks and keyboard keys, which can be viewed in the simulator's Input Bindings tab.

Your project is now fully configured for in-editor VR development. In the final lesson of this module, you will perform one last verification step by running a build of this basic scene, confirming that the entire setup is sound before we move on to the creative phase of designing your application in Spline.