When you are ready to try out your app on an actual device, you need to deploy it. Learn what you need to know to do this.
- [Instructor] If you happen to have access to an actual HoloLens device, we should deploy to it right now. Go to the menu option where it says HoloLens Emulator, click on the arrow, and now you get to choose between one of the two options: one is Remote Machine, the other one is Device. You might wonder what the difference is between these two. Device is a HoloLens device which is attached to your computer through a USB cable. This is by far the fastest way to deploy applications. Remote Machine is also a HoloLens, but this time connected to your machine through the WiFi connection.
This takes up more time. However, I do suggest you use the Remote Machine option. There's a simple reason for this. If you deploy your applications to your device, you want to test it out. You want to see your 3-D models up close, you want to walk around them. And trust me, you do not want to do that when you've got a cable attached to your device. You might break the device, you might pull the cable out of your machine, everything will go wrong, and you will probably break stuff. So if you want to walk around, go to Remote Machine.
Let's do that. I click on Remote Machine, I get this dialog box, and it will ask me which machine I want to use. It has already looked around on the network and found my HoloLens device, as you can see right down here. It found the IP address, and I'm ready to go. If you don't see this one, which might happen, there are a couple of things you need to do. First is, you need to check to make sure that your HoloLens is on the same WiFi network as your development machine is. If it is, you can go to the HoloLens and find out what your current IP address is, and enter it manually here on this box.
Luckily, we don't have to do this, so I can just select it here, click it. It will give me a warning about the authentication, which I'm just going to ignore. Select. If I try to deploy to the machine right now, by clicking on this button here on the top, it'll start to build, and then it will try to deploy to the machine. However, there's one thing that you need to do first. You need to enable your HoloLens to accept unsigned applications. You need to set it into developer mode, and this is something that we need to do on the device itself.
We need to set the HoloLens into developer mode. To do this, put on your device, switch it on, and go to the main menu. By using the bloom gesture, we can go to the main menu; and here, you see everything that we've got installed. Go to Settings and select tab one. Place the Settings menu somewhere. It will load up, and here are all the settings that we can change. In the lower right corner, you see the section that says Update and Security.
Choose that one. If you go to the panel on the left side, you see the tab saying For Developers. Choose that one. This is where you need to set this setting to On. As you can see, I've already done so. The reason for this is, otherwise, I wouldn't be able to record this video. On your device, you're probably set to Off, so you need to set it to On. Once you've done that, you can click on Remove, and you're good to go.
So now that we've enabled the developer options, we can start the actual deployment. We do this by click on the Remote Machine button here. It will start to do the build and then deploy to the actual device. Click it. You can see the progress here on the bottom of the screen. It says Deploy Started. It will do the build, and then we will go into debug mode once it's done. It is done building, and now it's starting with the application.
As you can see in the output window here, it's initializing things. It will probably show us that the splash screen is starting up. Here we go, and now the application is up and running. Let's see what it looks like in the HoloLens. So now that's all been taken care of, it's time to do the actual deployment. Click on Remote Machine, and Visual Studio will start to do the build.
Once it's done doing building, it will deploy it to the device, and it will start up the debugger. If you wear your HoloLens at this time, you will see the splash screen coming up. It might take a couple of seconds to load. And there you go, made with Unity. Congratulations! You just deployed your first HoloLens application to a HoloLens device. Now the application is running, but as we didn't do anything, this is quite boring and doesn't show anything. So let's change that.
Join instructors Dennis Vroegop and James Ashley for this introduction for HoloLens app development. They show you how to set up your development environment, including Unity and the HoloToolkit; how to deploy to HoloLens and the HoloLens emulator; and how to build apps that accept user input via gazes, tapping, and speech. Then discover how to use spatial mapping to detect your surroundings and analyze your environment with spatial understanding. Learn how to implement spatial sound that adds to the user's existing environment, and synchronize data to create shared experiences. Along the way, learn how it all comes together in two simple 3D apps: a visualization for enterprise business and a platform game.
- Installing Unity, Visual Studio, and the HoloToolkit
- Building an app in Unity
- Deploying to HoloLens or the HoloLens emulator
- Gaze and tapping
- Spatial mapping and spatial understanding
- Spatial sound
- Shared holograms
- Creating 3D enterprise apps
- Creating 3D games