- Prerequisites
- Mixed Reality Toolkit Core 3.0.1
- Mixed Reality Toolkit Input 3.0.0
- Mixed Reality Toolkit UX Core Scripts 3.0.0
- Mixed Reality Toolkit Standard Assets 3.0.0
If a project is being upgraded from MRTK 2 to 3, first all components and packages regarding MRTK 2 and the Stream MRTK 2 extension must be removed. Then the installation step below can be followed. The components corresponding to the removed components can be then added back. For more details about upgrading an MRTK 2 project to MRTK 3, see Migration Guide.
- Follow the steps listed in First Installation
- Import MRTK into the project
- Getting Started
- Make sure to select Core package version 3.0.1 or higher, as it includes fixes regarding Unity 2021.x support.
- Import Hololight Stream Extension for MRTK 3 into the project
- Open Package Manager in the Unity editor (
Window -> Package Manager
) Click the + then Add package from tarball... and select the filecom.hololight.stream.mrtk3-<version>.tgz
, where version is the current version, from thePackages
directory contained in this repository.
- Open Package Manager in the Unity editor (
- Follow the steps listed in Project Configuration.
- Configure the MRTK profile (
Edit -> Project Settings -> MRTK3 -> Profile
) with the added Stream Subsystems. A sample profile can be found in the package.
To configure a scene (e.g. to integrate with existing MRTK configurations) follow one of the steps below.
- Modify an existing Rig with the components from Stream Extension (see below) or
- Replace an existing MRTK XR Rig with the one supplied in the Stream MRTK 3 extension package. or
- Use the one-click scene configuration (see below)
- Controller Visualization Manager added to the XR Rig.
StreamInputActions
inPackages/Hololight Stream Extension for MRTK 3/Runtime
added to the Input Action Manager on the XR RigMain Camera -> Camera Settings Manager -> Transparent Display -> Clear Color
Alpha changed to 0 for XR Mode.- Model Prefab for MRTK Left/Right Hand Controllers changed to ones supplied in the package.
- In an existing model prefab, Controller Visualizer should be changed to Controller Visualizer (Stream)
- For both hand controllers, input action references in
Far Ray -> MRTK Ray Interactor -> Aim Pose Source -> Pose Source List -> Element 0
changed toStream (Left/Right)Hand/(Tracking State/PointerPosition/PointerRotation)
from the package - (Optional) Touch Controller Prefab added as a child to Camera Offset object for touchscreen input.
- (Optional) MRTK Spatial Mouse Controller Prefab added as a child to Camera Offset object for Desktop Client input.
- On the prefab,
XR Controller -> Select Action
reference changed toStream Mouse/Select
from the package - On the child object,
MRTK Spatial Mouse Interactor -> Mouse Move & Mouse Scroll Action
references changed toStream Mouse/MouseMove
andStream Mouse/MouseScroll
from the package* - On the child object,
MRTK Spatial Mouse Interactor -> Mouse Sensitivity
set to 0.5 - On the grand-child object
CursorVisual
, flip the sprite on X axis and scale the object for a more visible cursor
- On the prefab,
- (Optional) MRTK Speech GameObject enabled for speech input.
* MRTK Spatial Mouse Controller has a different behavior than MRTK 2's spatial mouse. Stream passes mouse movements directly to the MRTK 3 through Input Actions. It is also possible to use these Input Actions for different spatial mouse controller implementations.
- Choose
Hololight -> Stream -> Configure MRTK
to configure the scene for Hololight Stream. This will add necessary components for Stream to an existing MRTK XR Rig or a Main Camera and do the necessary modifications, or instantiate the Stream MRTK XR Rig for the scene to use.
Some features are not enabled automatically with one-click scene config. Below are steps for enabling these features.
- Eye Tracking:
- Add
Eye Tracking Manager
component to the XR Rig - Change
MRTK Gaze Controler -> XR Controller -> Position Action
toStream Gaze/Position
from the package - Change
MRTK Gaze Controler -> XR Controller -> Rotation Action
toStream Gaze/Rotation
from the package - Change
MRTK Gaze Controler -> XR Controller -> Tracking State Action
toStream Gaze/TrackingState
from the package - (Optional) For reticle visuals, add the
MRTK Ray Reticle Visual
component to theMRTK Gaze Controler -> Gaze Interactor
GameObject and addReticle
prefab or any other custom prefab as a child to it, and add Reticle's reference to theMRTK Ray Reticle Visual
- Add
Follow the steps listed in First Run.