This guide will help you set up a HoloLens 2 codebase.
- Windows 10
- Visual Studio 2019 or later
- Unity 2019.4 or later
- MRTK (Mixed Reality Toolkit) v2.5.1 or later
-
Install the Prerequisites: Make sure you have all the prerequisites installed on your system.
-
Create a New Unity Project: Open Unity Hub and create a new 3D project.
-
Import MRTK: Download and import the MRTK packages into your Unity project.
-
Configure the Project for HoloLens 2: In Unity, go to
Edit > Project Settings > Player > XR Settings
and enableVirtual Reality Supported
. AddWindows Mixed Reality
to the Virtual Reality SDKs list. -
Build the Project: Go to
File > Build Settings
, add your scenes, and clickBuild
. Choose a directory for the build. -
Open in Visual Studio: Navigate to the build directory and open the solution in Visual Studio.
-
Deploy to HoloLens 2: In Visual Studio, set the target device and deploy the application to your HoloLens 2 device.
You should now have a basic HoloLens 2 codebase set up. For more detailed instructions, refer to the official Microsoft documentation.