Unity2021 and MRTK2.8 build hololens2 environment

Preparation

  1. Unity2021
  2. Visual Studio2019
  3. Mixed Reality Feature Tool (download link: Download Mixed Reality Feature Tool from Official Microsoft Download Center )
  4. HoloLens2 hardware device

HoloLens2 hardware setup

This step mainly opens the developer mode of HoloLens.

        1. Open the main menu and click Settings:

        

        2. Click "Update and Security", then select "For Developers" on the left, and turn on all the red boxes:

       

        There is a "Pairing" button on this page. After clicking, a pop-up window will display a series of numbers, which will be used when compiling and installing later.

        

 

Computer Win10 settings

You also need to turn on the developer function on the computer.

Click Settings, open "Update and Security", then select "Developer Options" on the left, and turn on "Developer Mode":

        

Unity build project

Using unityHub to build a 3D Core project, the specific details will not be repeated.

Open the Unity "Build Settings" window, switch the platform to "Universal Windows Platform", set as follows:

Import MRTK development kit

Install MRTK with "Mixed Display Function Tool"

1. Double-click to open "MixedRealityFeatureTool.exe", wait for a while, and click the "Start" button:

 2. Select the unity directory you just created, and click "Discover Features":

 3. Select as follows, click "Get Features":

 4. Click the blue button all the way back, and finally click "Exit":

At this time, return to unity, and the plug-in just configured will be automatically loaded, and the following click "yes" will appear.

After loading, it will automatically restart unity. After restarting, a MRTK configuration box will appear. Click the first option:

 

 Click the button below:

 Start the following configuration:

 Click to fix all problems:

 After closing, click "Apply Settings"

 Import the TMP extension:

 The configuration is complete.

Import the SDK package

Select menu, add sdk package:

Select HoloLens default configuration:

After running, the following screen appears, and the basic configuration is done:

 

 

The next article introduces deployment and packaging! ! !

Guess you like

Origin blog.csdn.net/qq_41014870/article/details/128801259