Setting up a HoloLens Unity project
You can create apps for HoloLens by using UWP (ordinary 2D apps), you can also make 3D apps by using tools like Unity.
This post will cover what you need to do to setup a Unity project to work on HoloLens.
I have had the opportunity to work with HoloLens for a while now and I should share some of my tips and tricks.
You need Unity installed on your computer, follow the instructions here:
While you're at it, I would also recommend installing Visual Studio 2015 and the HoloLens emulator (not needed for this blog post).
Setting things up
Let's take a look at what you need to do to set everything up.
I will show a really simple way to do that.
Create new project
Microsoft also provides HoloToolkit, a library containing a lot of useful components you can use when building HoloLens apps, you also get a couple of menu items that automatically make the changes you need.
You can download it from HoloToolkit.azurewebsites.net (or from github).
This will show a list of files to be imported, just click Import and the installation will take care of everything,
Now you should see a menu item called HoloToolkit.
First delete the camera and then add the Camera.prefab in the HoloToolkit/Utilities/Prefabs folder, this camera is customized for holographic development.
In the HoloLens emulator you can move around using the aswd keys.
To enable the same behavior in the Unity player you can add ManualCameraControl.cs (HoloToolkit/Utilities/Scripts) to your camera.
To fix the scene (set the correct position of the camera amongst other things) click "Apply HoloLens Scene Settings".
Now save your scene and place it in a folder called Scenes (or whatever location you prefer).
Now click the "Apply HoloLens Project Settings" it will make sure the near plane is set to a good value and make sure Holographic is available in the project.
You will get a couple of questions you can just select yes and then restart the project (Unity will do that automatically).
Now you are all done, and it's time to create your holograms, but that will be the subject of another blog post.
If you want to know in detail what changes these scripts made , here is an excellent blog post .
You can also read more here