O'Reilly logo

Microsoft HoloLens Developer’s Guide by Dennis Vroegop

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connecting from Unity3D

We can use our server as a source for Unity3D apps as well. But I have to warn you: the code will look ugly. We will fix this more or less in the next chapter, but for now we just have to live with it.

Create a new Unity3D project and set it up to target the HoloLens. Add something interesting to the scene, such as a cube somewhere. Attach a new script to that cube. This should not pose a problem anymore as we have done it numerous times.

Open the script in Visual Studio.

We do not need Json.NET here. Unity3D has built-in support for JSON. However, the way this library handles JSON data is slightly different, so we have to modify our data structure a bit. This is what I added to my code file:

 [Serializable] public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required