# AR Modules

This page describes how to use the AR modules of the [Realvirtual.io XR & Multiuser](/extensions/realvirtual.io-industrial-metaverse.md) extension in your realvirtual scene.

Make sure you have correctly set up your device as described in the [Setup Guide](/extensions/realvirtual.io-industrial-metaverse/setup-guide.md).

{% embed url="<https://youtube.com/shorts/JIZQmuc4O2Y?si=03T5CYb4Z-lRYxpn>" %}
Example application created with Meta Quest 3
{% endembed %}

## realvirtual-ar-player

The realvirtual-ar-player prefab enables AR development in your scene.

![](/files/7tuoctHDaRTij5qo2ft4)

Search for **realvirtual-vr-player** and simply drag the prefab into your hierarchy. This initializes the AR development environment in your scene.

* The **OVRPlayerController** manages device tracking and user Input detection. Please refer to the official documentaion of the [Meta XR SDK](https://developer.oculus.com/documentation/unity/unity-gs-overview/).\\
* The **PlayerUI** holds the main AR user interface enabling the user to trigger various functionalities.\
  The player can toggle the main user menu by pressing the **A** button on the right controller.\
  Besides the functionality described in [VR Modules](/extensions/realvirtual.io-industrial-metaverse/vr-modules.md), the main menu in AR has some additional features described below.\
  \ <img src="/files/GHSBMMwycykt6JkIIikm" alt="" data-size="original">\
  \
  \ <img src="/files/TwP7lUlniiWEMCdjE4qY" alt="" data-size="line">This button toggles the scene mesh. This is the mesh placeable objects can be placed on.\
  \ <img src="/files/DKNSGEkP83lAkKrPjQSy" alt="" data-size="line">This button toggles depth occlusion. In order to use depth occlusion a separate installation of the Meta Depth API for Unity is required. Please refer to the official [Installation Guide](https://developer.oculus.com/documentation/unity/unity-depthapi/). Once the Meta Depth API is installed navigate to File > Build Settings > Player Settings > Other Settings > Script Compilation, add the `META_DEPTH_API` compile switch and press Apply.\\

  <figure><img src="/files/uVTN3RsdCGWsTmC5iSEc" alt="" width="375"><figcaption><p>Adding compile switch for depth occlusion</p></figcaption></figure>
* The **Passthrough** object contains the OVR Passthrough Layer component required for enabling passthrough. Refer to the official [Meta XR SDK](https://developer.oculus.com/documentation/unity/unity-gs-overview/) for details.\\
* The **Placer** object controlls the behaviour of the placement and allows to adjust the parameters for the placement.\\
* The **TransformManager** persists the transforms of all the placeables in the scene between multiple runtime sessions. To disable this feature, disable the TransformManager game object.\\
* The AR game object contains the OVRSceneManager documented in the [Meta XR SDK](https://developer.oculus.com/documentation/unity/unity-gs-overview/) and the EnvironmentDepthOcclusion game object documented in the [Depth API for Unity](https://developer.oculus.com/documentation/unity/unity-depthapi/). Both objects control interactions with the real world environment.\\
* The **XR Environment** object initializes the scene setup for optimal use with VR or AR. It manages lighting and core environmental aspects such as ground and sky.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.realvirtual.io/extensions/realvirtual.io-industrial-metaverse/ar-modules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
