Configuring Unity for HoloLens Application Development

Kushal B Kusram
4 min readApr 3, 2020

--

This article shall guide you in a step-by-step manner to help you set up your Unity environment to develop Unity based games and applications for HoloLens. Microsoft recommends Unity 2017.4.x along with Microsoft Visual Studio 2017 if you are developing in HTK 2017.

Step 0

Additional Components Required

Along with Unity we need to set up a few more additional components, while installing Unity or if you already have Unity installed then I’d recommend to download the installer and upon reaching the “Choose Components” screen, please select Microsoft Visual Studio Community 2017, Windows Store .NET Scripting Backend and Windows Store IL2CPP Scripting Backend along with Unity, which might be selected by default.

Step 1

Unity 2017.4

a. When you launch Unity Editor, the Home Screen shall appear first. From this Home Screen, click on Projects to view the Projects Tab.
b. To create a new Project, click on New and proceed to give it a name, location and under templates make sure to select 3D.
c. Once you have assigned the parameters, click on Create Project, Unity will load the required presets and set up a default working environment which we shall now begin modifying as per our requirements.

Familiarize yourself with the screen shown above which will be your Unity workspace.

Step 2

File > Build Settings

Unity is used to build for various different platforms, hence the first few things to be changed are in File > Build Settings.
a. By default Unity has PC, Mac & Linux Standalone selected, change it to Universal Windows Platform by selecting it and clicking on “Switch Platform”
b. The next thing is change Target Device to “HoloLens” and check the radio button beside Unity C# Projects

For the next step click on “Player Settings”

Step 3

Once you have clicked on “Player Settings” you will see an “Inspector” panel load on the right. You will have to change the following Settings for Universal Windows Platform

a. Click on “Other Settings” and concentrate on the configuration section.

Scripting Runtime Version = Stable (.NET 3.5 Equivalent)
Scripting Backend = .NET
API Level = .NET 4.6

b. Click on “Publishing Settings” and concentrate on capabilities section.

Options here are configured and transferred to the final Visual Studio Project. Choose the HoloLens features that you want your application to access.

c. Click on “XR Settings”

Make sure Virtual Reality is checked and SDKs chosen is Windows Mixed Reality.

d. Navigate to Edit > Project Settings > Quality

Make sure the quality for Universal Windows Platform (Windows logo) is selected as Very Low.

You may now proceed to import HTK 2017 and start developing applications and games for HoloLens. Once you have completed or wish to debug your build on HoloLens, go to File > Build Settings, click on “Build” and this will compile and export a Microsoft Visual Studio project. You may want to have a look at this article to Pair Your HoloLens with Visual Studio and proceed to deploy your application to HoloLens.

Note: HoloLens (2nd Gen) may require a slightly different development environment.

--

--