20160520_081748_HoloLens

[Cross-posted from blog.davemdavis.net]

When Microsoft first announced the HoloLens, I was interested in the possibilities that this device opened up. When I tried it a few months later at Build 2015, I knew I had to get my hands on it and start to developing for it.  This past winter, Microsoft announced that they were going to start selling developer devices so that developers could start getting apps into the store. Microsoft wants a vibrant app store before these devices go to consumers. Of course I had to sign up to get one. Since there is a limited number of devices being manufactured, Microsoft set up distribution in waves.  Developers in each wave could order 2 device when their time came.  They also said that it would take 2-3 months for each wave to be served. I was in wave 2, so the wait was on.

Last week I received my notice that it was my turn.  I ordered the device and got it a few days later. That was last Thursday. So I did what everyone does when they get one, I played.  There are some pretty cool apps already available for the device including the community suggested, Microsoft built, Galaxy Explorer. You can even get the source code if you want to see how the magic is done. Once I got the playing out of the way it was time to get down to business. I don’t want to just play with holograms I want to build them.

Lately Microsoft has been building great developer resource websites to help get developers started on their technologies. That is true for HoloLens. I encourage you to pop over to the Holographic Developer Center and check all the resources available. There are two types of apps you can build for the HoloLens, 2D and 3D (holograms). 2D apps are just Windows 10 Universal Apps. So if you can build a Universal Windows App then you can build a HoloLens App. To load the HoloLens tools and emulator you will need Visual Studio 2015 Update 2. If you want to build 3D apps you will need a different tool.  The easiest way is to use Unity3D but not just any version of Unity3D, a special beta version. Note the word special, more on that in a bit.

hololens errorThe SDK, the emulator and the special beta version of Unity were released at this years Build conference in San Francisco. I was downloading the tools before the keynote announcing the was done.  I wanted to start to play. I got things up and running with relative ease. If you don’t have a device the emulator is pretty good. Fast forward to this past weekend when I wanted to start developing for the device. I figured I would use the app I got running in the emulator. No Joy! Try it in the emulator again. No Joy! So I Google’d it with Bing and found that other people were having similar issues but not just with HoloLens apps with Win 10 apps as well. The solution reinstall the tools.

Keep in mind there are a lot of beta bits/special configurations required to develop for HoloLens. We are early on in the process, on the cutting edge so not all of the tooling is locked in.  If you are like me and develop for many different platforms and experiment with many beta bits, your Visual Studio can get out of whack. I did not want to reinstall Visual Studio so I went about tweaking, big mistake. Come to find out I couldn’t even build and deploy UWP apps to my local machine. Step one fix UWP. Step two deploy 2D UWP app to HoloLens. To accomplish this I ended up having to repair my Visual Studio instance. Not as bad as reinstalling but still time consuming. Mission accomplished.

Now onto holograms. I decided I would not try to wing it so I took a step back and visited Microsoft’s Holographic Academy.  While I was out at Build this year I got to do a half day Holographic Academy session and it was a great way to get into developing for the HoloLens. More specifically I visited Holograms 100: Getting Started With Unity. This tutorial walks you through setting up Unity for HoloLens development. At the end you have a cube floating in your environment (the Hello World for holograms). I had the special version of Unity so I was ready to go.  I started the tutorial. I try to deploy to the HoloLens….No Joy! Back to Bing.  It seems that the special version of Unity has been updated since Build.

Ok time to uninstall and reinstall Unity and people on Bing said beta 16 is the flavor of the month. Get it on my machine. Let’s get this cube floating…..no! Now what? I go back and walk through the tutorial again and realize that the virtual SDK is not set correctly.  It should look like this:

UnitySDK

Come to find out it is not beta 16 I need it was beta 16-HTP.  Lesson learned: follow the links on the Dev center page to ensure that you are using the latest bits.

Ok time to uninstall and reinstall Unity……again!! Right! Here we go. Redeploy and…..a 2D app running the Windows 10 unity player. There is my cube but it is not 3D.  Why can’t I get a cube to float in front of me? I am going on 2 days of this. All I want to do is see a floating cube. Is that too much to ask for?  Come to find out I skipped a step in the tutorial:

ManifestSettings

This seems important. Don’t you think? So after 2 days of tinkering and uninstalling and reinstalling Unity and repairing Visual Studio a couple of time….success (see picture above).  A floating square!

Why am I excited about a floating square? I have no Unity experience so I am learning as I go. This exercise has taught me a few things.  First Don’t be afraid to reinstall the tools if they weren’t working. I think that my initial reaction to having to do that kept me going down a path of try this/fail to the point where the time I wasted tinkering could have been spent developing. On the plus side I did learn about all the different settings that I need to troubleshoot in the future. Next, it is early on in the development cycle and the tooling is still being developed. So things that you would expect to be done for you may not be done for you. Case in point the manifest change that you need to make. Finally there is not a lot of help outside of the community page for HoloLens development.  It is that early so start there.

So where do I go from here.  I want to do the other tutorials in the Academy.  They address the capabilities of the SDK.  Next I will spend some time poking around the documentation to get a better feel for what is available. To me the compelling enterprise examples will require getting external data in to my apps. So I will look into/develop some best practices around that. How do I get data into my Unity app? How do I make it interactive? Finally I need to learn how to really use Unity beyond floating cubes. I see Unity training/tutorials/experimentation in my future.

I am excited about where HoloLens is taking computing.  I can only imagine where we go from here.  In the mean time I get to build holograms and I think that is pretty cool.

MagicKingdomEntrancePicture

Anyone who has visited the Magic Kingdom in Disney World, will recognize this sign that hangs above the entrance.  I believe that this can applies to the world that HoloLens opens.