Setup of Unity for HoloLens
Introduction of Unity:
Unity is a cross-platform game engine developed by Unity Technologies, for creating games in both 2D and 3D. Unity supports building games for many platforms such as iOS, Android, Windows, PlayStation, Oculus Rift, HTC Vive, HoloLens and many more.
This guide shows you how to install Unity Personal on Windows; however, installing Unity on macOS follows a very similar procedure.
Installing Unity Hub on Windows:
Follow the below steps to install Unity Hub on Windows:
Step 1: Visit the official unity website and download the installer using any web browser.
You can visit the download page of Unity website
Step 2: Click on Download for windows, downloading of the executable file will start shortly. It is a small 103 MB file that will hardly take a minute.
If you are using Mac then Download Unity Hub separately
Step 3: Now check for the executable file in downloads in your system and run it.
Step 4: It will prompt confirmation to make changes to your system. Click on Yes.
Step 5: Select the components you would like to be installed with Unity and click “Next”. Note: If you ever want to change the components, you can re-run the installer.
Step 6: The next screen will be of License Agreement, click on I Agree.
Step 7: The next screen will be of installing location so choose the drive which will have sufficient memory space for installation.
Step 8: After this installation process will start and will hardly take a minute to complete the installation.
Step 9: Click on Finish after the installation process is complete.
Step 10: Unity Hub is successfully installed on the system and an icon is created on the desktop.
Step 11: Run the software and see the interface.
Congratulations!!! You have successfully completed one mile.
Set Up Unity for HoloLens Project:
Step 1: Create an Account for Unity Projects. Click on the left top button.
Step 2: Click on Create Account. It will throw you to a page where you need to create your Unity ID
Step 3: Create a Unity ID
Step 4: Click on Create a Unity ID. Then this window will occur.
Step 5: You’ll get the email. Confirm and verify your email ID.
Step 6: Sign In into your Unity ID
Step 7: You’ll get the following window after Signing In.
Step 8: Install the editor version of Unity. Click on Installs
Step 9: Click on Install Editor. You’ll get the following window. Click on Install Button of the newly updated version of unity editor.
Step 10: Select following modules. You can get a visual studio here in modules.
Then click on Continue.
Step 11: Click on Install
Step 12: It will start the installation process.
Step 13: The present modules will be following
Congratulations!!! You’ve successfully completed the second Mile.
Recommended by LinkedIn
Set Up HoloLens 2 Project in Unity:
To build our HoloLens 2 application we will use the Unity game engine. Follow these steps to configure and build a Unity project for HoloLens 2.
Step 1: Open Unity and create a new 3D project
Step 2: Open File -> Build Settings and switch the platform to Universal Windows Platform. Change the Architecture to ARM64. Make sure your minimum platform version is set to 10.0.18362.0.Note: Don’t forget to click Add Open Scenes if you already have a project that you’re ready to build and test on your HoloLens 2 device or emulator. The rest of the settings should be configured as shown with the screenshot below. Finally, press Switch Platform.
Step 3: Let’s add Microsoft Mixed Reality Toolkit (MRTK) into our Unity project. Download the mixed reality toolkit for Unity from the Mixed Reality Feature Tool kit website.
Step 4: Before you can run the Mixed Reality Feature Tool, you’ll need:
.NET 5.0 Runtime And Windows 10 or 11
You can download .NET 5.0 Runtime
Step 5: Then download Mixed Reality Feature Tool Kit
Step 6: Click on Download, It will give you a zip folder of this tool kit.
Step 7: Extract this zip folder.
Step 8: Run the Application of Mixed Reality Feature Tool
Step 9: Launch the Mixed Reality Feature Tool from the executable file, which displays the start page on first launch.
Step 10: Select Start to begin discovering feature packages
Step 11: Selecting your Unity project
To ensure that all discovered features are supported on your project's version of Unity, the first step is to point the Mixed Reality Feature Tool to your project using the ellipsis button (to the right of the project path field).
The dialog that's displayed when browsing for the Unity project folder contains '_' as the file name. There must be a value for the file name to enable the folder to be selected.
Step 12: Discover Features. Check the Mixed Reality Toolkit Foundation dialog.
Step 13: Click on Get Features
Step 14: Click on Validate. It will say No issues detected.
Step 15: Click on Import
Step 16: Click on Approve and then exit the window. Open Unity Now and click on the Yes button of the following window. It will reopen Unity.
Step 17: MRTK Project Configuration
Step 18: Click on Unity Open XR plugin. Then the following window will occur.
Step 19: Click on Show XR Plug-in Management Settings and check the following items in dialogs.
Depth Submission Mode - Depth 16 Bit
Add Interaction Profiles
Step 20: Click on Next of MRTK Project Configurator and press the Apply button.
Unity will reopen now.
Step 21: Click on Mixed Reality -> ToolKit -> Add Scene and Configure
Step 22: Create a cube in scene.
Step 23: Give functionality to cube like following in the Inspector window.
Congratulations!!! You have made the Unity Project for HoloLens2.
Tip: The cover image curtesy - xrtoday.com