Skip to main content
Version: 3.0.0

Mixed Reality

WEAVR supports Mixed Reality (MR) on two families of devices:

  • Meta Quest (and other OpenXR pass-through devices) — the recommended, fully supported path, based on the OpenXR Meta package and AR Foundation.
  • Microsoft HoloLens — supported through the Mixed Reality Toolkit (MRTK), with limited support.

Mixed Reality on Meta Quest (Pass-through)​

WEAVR integrates the OpenXR Meta package and AR Foundation to combine the virtual procedure with the real world. The following AR capabilities are supported: AR session management, camera image rendering (pass-through), plane tracking, spatial anchors and ray-casting on tracked objects.

Scene setup​

Add the following components to the PlayerRIG of the WEAVR game object:

  • AR Session
  • AR Plane Manager
  • AR Anchor Manager
  • AR Camera Manager

The Plane and Anchor managers start tracking in accordance with the AR Session. To display the device pass-through, set the AR Camera Manager's Background Type to Solid Color.

MREnabler component​

The MREnabler component enables or disables the AR components above and applies the camera changes required to switch between an immersive (VR) and a Mixed Reality experience.

MREnabler component

PropertyFunction
Environment ModeThe experience mode: Automatic, MixedReality or VirtualReality.
PassthroughEnables/disables the device pass-through.
PlanesEnables/disables plane tracking.
AnchorsEnables/disables spatial anchors.

MR Environment Manager​

The MREnvironmentManager registers the objects that make up the virtual environment, so they can be shown or hidden during the experience to switch between immersive and Mixed Reality. It uses a white list / black list system to include or exclude objects that belong to the same hierarchy: add a parent object to register all of its children recursively, and add a child to the White List to exclude it from a black-listed parent.

MR Environment Manager component

To make managing the environment objects easier, the Hierarchy shows interactive icons next to each game object, so you can quickly select or deselect the objects of the virtual environment.

Environment objects in the Hierarchy

The component exposes the following members to control the visibility of the environment objects:

MemberDescription
IsVisibleSets the visibility of the virtual environment with a boolean.
ToggleEnvironmentAnimationShows/hides the virtual environment with a fade animation, specifying its duration.
AnimateEnvironmentVisibilitySets the normalized lerp value of the fade effect (used by the Toggle Environment Visibility action).

Mixed Reality on HoloLens​

To setup a scene for HoloLens 2 follow these steps:

  1. Switch to Universal Windows Platform and apply the settings below.

    UWP Settings

    After switching to UWP, the Mixed Reality Toolkit components are installed. In Unity, a new Mixed Reality menu is added. Then the MRTK Project Configurator is displayed.

  2. If the MRTK Project Configurator is not displayed automatically, you can manually open it in the menu item Mixed Reality > Toolkit > Utilities > Configure Project for MRTK.

  3. In the MRTK Project Configurator, select Unity OpenXR plugin.

    MRTK Configurator

  4. If the following window is displayed, click on the Apply Settings button.

    MRTK Configurator 2

  5. Now go to Project Settings > XR Plug-In Management and set as follows.

    XR Plug-In Setup

  6. In Project Validation fix all the issues that may appear, with the FIX ALL button.

  7. Go to OpenXR and apply the following settings.

    OpenXR Setup

  8. In the MRTK Project Configurator, apply the default settings.

    MRTK Default Settings

  9. Save and restart Unity.

  10. Setup the scene with WEAVR.

  11. Disable the PlayerRIG from the WEAVR game object.

  12. Add the following MRTK objects to the scene:

    • MixedRealityToolkit
    • MixedRealityPlayspace
    • MixedRealitySceneContent
note

WEAVR provides limited support for HoloLens.