Develop
Develop
Select your platform

Simulate a Mixed Reality Environment

Updated: Aug 9, 2024
Outdated XR Simulator Version
This information applies to an older version of the XR Simulator, for new projects use the Standalone XR Simulator which supports any OpenXR application.
To run a mixed reality application in Meta XR Simulator, you need to launch the Synthetic Environment Server (SES), a feature of Meta XR Simulator that enables mixed reality simulations.

Prerequisites

To use the Synthetic Environment Server, you need Meta XR Simulator installed and imported into an existing Unity project set up for XR development.
For instructions on setting up Meta XR Simulator, see Simulate a VR Environment with Meta XR Simulator.

Start the Synthetic Environment Server

To use the Synthetic Environment Server:
  1. Activate the Meta XR Simulator.
  2. Launch the Synthetic Environment Server (SES) by navigating to Meta > Meta XR Simulator > Synthetic Environment Server and selecting one from the three simulated environments.
    The Synthetic Environment Server window opens, displaying the simulated environment.
  3. Minimize, but do not close, the Synthetic Environment Server window. Keep it running in the background.
  4. Click the Play button in Unity to run your game inside the simulated environment of your choice.
    Click the Play button to run your game inside the simulated environment of your choice.
Note: Meta XR Simulator does not support hot-switching between environments, but you may switch to another environment without closing the first one when the simulator is not running. To do so, launch another server while the first one is running. When prompted to terminate the existing server before opening a new scene, select Yes.

Stop the Synthetic Environment Server

To stop the Synthetic Environment Server:
  1. Exit Meta XR Simulator.
  2. Select Meta > Meta XR Simulator > Synthetic Environment Server > Stop Server.

Example

You can explore the Synthetic Environment Server with a sample scene:
  1. Install the Meta XR Simulator Samples package from the Unity Asset Store, and then import the samples into your project with the Unity Package Manager.
  2. Open the SceneManager sample, located in Assets/Samples/Meta XR Simulator Samples/<version>/Usage Assets.
  3. In the scene, select OVRCameraRig, and in the inspector, remove the Passthrough Play In Editor script.
    In the scene, select OVRCameraRig, and in the inspector, remove the Passthrough Play In Editor script
  4. Activate the simulator and launch the Synthetic Environment Server. Then, click the Play button in the Unity Editor, and see scene entities superimposed on the passthrough environment.
    Following the instructions in the Running Mixed Reality Applications section, activate the simulator and launch a synthetic environment server.

Learn more

To learn more about Meta XR Simulator, see the following resources:
Did you find this page helpful?