Unity & MRTK with HoloLens2 fyp23027, December 28, 2023December 28, 2023 Here is the documentation/tutorial for setting up Unity and MRTK to use on HoloLens2 For the most updated version with images, please go to my Notion page. Unity & MRTK with HoloLens2 MRTK SetupImport MRTK to Unity (https://youtu.be/1lIuMbW7o8I?t=1200)→ download MRTK from the github repo release https://github.com/microsoft/MixedRealityToolkit-Unity/releases/tag/v2.8.3→ import asset from MRTK to Unity project⇒ under Mixed Reality ToolkitMixed Reality Toolkit Foundation[Optional] Mixed Reality Toolkit Tools[Optional] Mixed Reality Toolkit Examples[Optional] Mixed Reality Toolkit Extensions[Optional] Mixed Reality Toolkit TestUtilities⇒ under Platform SupportMixed Reality OpenXR PluginAdd the current scene to MRTK configuration→ MixedReality ⇒ Toolkit ⇒ Add to Scene and Configuration → NOTE: the following game object will be added to the sceneConfigure MRTK for AR→ MixedRealityToolKit game object ⇒ MixedRealityToolKit script⇒ set MRTK configuration to DefaultMixedRealityToolkitConfigureation ⇒ clone configuration⇒ Camera ⇒ clone Camera configuration ⇒ both Opaque & Transparent ⇒ Clear Flags ⇒ Color⇒ Background Color ⇒ RGBA(0,0,0,0)→ MixedRealityPlaySpace game object ⇒ Main Camera⇒ Background ⇒ RGBA(0,0,0,0) Unity SettingUnity Version: 2020.3.37f1Build Setting (in File)Project Settings (in Edit)XR Plug-in Management → Initialize XR on Startup ⇒ tick→ Plug-in Provider⇒ OpenXR ⇒ tick ⇒ Microsoft HoloLens feature group ⇒ tick OpenXR→ Depth Submission Mode ⇒ Depth 16 bit→ Interaction Profiles⇒ Eye Gaze Interaction Profile⇒ Microsoft Hand Interaction Profile⇒ Microsoft Motion Controller Profile→ OpenXR Feature Group⇒ Microsoft HoloLens ⇒ tick⇒ Hand Tracking ⇒ tick⇒ Motion Controller Model⇒ NOTE: MUST uncheck Holographic Remoting remote app→ Project Validation ⇒ fix all error Build & Deploy to HoloLensBuild from Build Setting→ NOTE: must build in an empty folderOpen the .sln file ⇒ with Visual StudioConfigure for Deploy→ Solution Configuration ⇒ Release→ Solution Platform ⇒ ARM64→ next to green build button ⇒ DeviceDeploy → Debug ⇒ Start Without Debugging→ connect HoloLens with the PC (only first time or forgot device)→ Setting in HoloLens ⇒ For Developer ⇒ Device ⇒ get PIN→ NOTE: MUST turn on all the options in the For Developer Development DevelopmentHoloLens2MRTKUnity
MRTK SetupImport MRTK to Unity (https://youtu.be/1lIuMbW7o8I?t=1200)→ download MRTK from the github repo release https://github.com/microsoft/MixedRealityToolkit-Unity/releases/tag/v2.8.3→ import asset from MRTK to Unity project⇒ under Mixed Reality ToolkitMixed Reality Toolkit Foundation[Optional] Mixed Reality Toolkit Tools[Optional] Mixed Reality Toolkit Examples[Optional] Mixed Reality Toolkit Extensions[Optional] Mixed Reality Toolkit TestUtilities⇒ under Platform SupportMixed Reality OpenXR PluginAdd the current scene to MRTK configuration→ MixedReality ⇒ Toolkit ⇒ Add to Scene and Configuration → NOTE: the following game object will be added to the sceneConfigure MRTK for AR→ MixedRealityToolKit game object ⇒ MixedRealityToolKit script⇒ set MRTK configuration to DefaultMixedRealityToolkitConfigureation ⇒ clone configuration⇒ Camera ⇒ clone Camera configuration ⇒ both Opaque & Transparent ⇒ Clear Flags ⇒ Color⇒ Background Color ⇒ RGBA(0,0,0,0)→ MixedRealityPlaySpace game object ⇒ Main Camera⇒ Background ⇒ RGBA(0,0,0,0) Unity SettingUnity Version: 2020.3.37f1Build Setting (in File)Project Settings (in Edit)XR Plug-in Management → Initialize XR on Startup ⇒ tick→ Plug-in Provider⇒ OpenXR ⇒ tick ⇒ Microsoft HoloLens feature group ⇒ tick OpenXR→ Depth Submission Mode ⇒ Depth 16 bit→ Interaction Profiles⇒ Eye Gaze Interaction Profile⇒ Microsoft Hand Interaction Profile⇒ Microsoft Motion Controller Profile→ OpenXR Feature Group⇒ Microsoft HoloLens ⇒ tick⇒ Hand Tracking ⇒ tick⇒ Motion Controller Model⇒ NOTE: MUST uncheck Holographic Remoting remote app→ Project Validation ⇒ fix all error Build & Deploy to HoloLensBuild from Build Setting→ NOTE: must build in an empty folderOpen the .sln file ⇒ with Visual StudioConfigure for Deploy→ Solution Configuration ⇒ Release→ Solution Platform ⇒ ARM64→ next to green build button ⇒ DeviceDeploy → Debug ⇒ Start Without Debugging→ connect HoloLens with the PC (only first time or forgot device)→ Setting in HoloLens ⇒ For Developer ⇒ Device ⇒ get PIN→ NOTE: MUST turn on all the options in the For Developer