Sample HoloLens Unity project for .NET Magic Night (2016-08-09)
- Build Visual Studio solution.
- Run App in HoloLens Emulator.
- Use Gaze to project the cursor onto surfaces.
- Use Gesture to make Earth drop and bounce.
- Use Gesture to push Earth around.
- Use Voice Command to reset Earth position.
You will need to install several tools and potentially upgrade your version of Windows to be able to develop for HoloLens.
- Upgrade to Windows 10 Pro
- If you’re Windows running under VMware Fusion
- Shutdown your Windows 10 virtual machine
- Open the “Virtual Machine Library”
- Select your Windows 10 virtual machine
- Click “Settings”
- Click “Processors & Memory”
- Set Memory to 8096MB
- Expand “Advanced Options”
- Check “Enable hypervisor applications in this virtual machine”
- Start your virtual machine up
- Make sure Hyper-V is turned On in Windows 10
- Click the “Start” button
- Type “features” and select “Turn Windows features on or off”
- Turn “Hyper-V” on
- Install Visual Studio Update 3, HoloLens Emulator, and Unity HoloLens Technical Preview
- Create Unity 3D project
- Change coordinate of main camera to x:0 y:0 x:0
- Change “Clear Flags” to “Solid Color” and set the Background color to black
- Save project and scene as “Main”
- Click “Edit” > “Project Settings” > “Quality”
- Select “Fastest” as the default level under the Windows Store Logo (green).
- Click “Edit” > “Project Settings” > “Editor”
- Select “Visible Meta Files” under “Version Control”
- Select “Force Text” under “Asset Serialization”
- Click “File” > “Build Settings…”
- Click “Add Open Scenes” button to add the Main scene
- Select “Windows Store” as the Platform
- Select “Universal 10” as the SDK
- Select “D3D” as UWP Build Type
- Check “Unity C# Project”
- Click “Player Settings…”
1. Select “Publishing Settings” and under the “Capabilities” section check the following options:
- InternetClient
- Microphone
- SpacialPerception 1. Select “Other Settings” and under the “Rendering” section check “Virtual Reality Supported” and “Use 16-bit Depth Buffers” (see performance optimizations for HoloLens apps) 1. Click “Build”
- Create the “App” folder in the project, navigate into the folder and start the build
- Inside the “App” folder open the solution (*.sln file) in Visual Studio
- Switch architecture to “x86’ (instead of “ARM”)
- Run under "HoloLensEmulator" instead of “LocalMachine” as the target runner
- Attempt to run the project, it should launch the emulator
- Keep Visual Studio open and do all your coding there
- Keep emulator running at all times
- Use ESC to reset camera position in emulator (more emulator keys)
- Use W, A, S, D to move
- Use cursor keys to look up, down, right, and left
- Use page up/down to move up/down
- Use a mouse (if you can)
- Watch some “HoloLens Academy” tutorials