未加星标

HoloLens development on MacOS using Parallels

字体大小 | |
[系统(windows) 所属分类 系统(windows) | 发布者 店小二05 | 时间 2016 | 作者 红领巾 ] 0人收藏点击收藏
Introduction

This is a guide to get started with HoloLens development running windows 10 inside Parallels on MacOS.

I used this page to get a list of the required tools, but getting everything running as intended ended up taking me a couple of days, so I guess sharing the pitfalls might help someone else.

https://developer.microsoft.com/en-us/windows/holographic/install_the_tools

HoloLens development requires a Windows environment. I set up a virtual machine using Parallels, but a bootcamp partition can be used as well. For using the same setup as me, the following software is required:

Parallels Visual Studio 2015 Update 3 Windows 10 SDK Unity HoloLens Technical Preview edition HoloLens Emulator (if you don’t have access to an actual HoloLens) The first thing to do is install Parallels. I just started with the 14 days free trial.

http://trial.parallels.com/

Parallels lets you use the Windows 10 Development without getting a Windows 10 image from elsewhere.

Guide

Next up, install Visual Studio inside the virtual machine. I did a custom install just to make sure that the required two tools was being installed:

Tools (1.4) Windows 10 SDK (10.0.10586)

https://developer.microsoft.com/en-us/windows/downloads

Next up install Unity HoloLens Technical Preview edition inside the wm. There are a couple og different beta builds available of this version of Unity, I ended up trying several because of different problems, but I ended up getting 5.4.0f3-HTP to work. Make sure that Windows Store support is enabled during the installation.

If you don’t have access to an actual HoloLens, get the emulator here:

https://unity3d.com/partners/windows/hololens

This all went well and easy for me, the real problems started when attempting to build and deploy an actual HoloLens app. There are some great tutorials for setting up pet projects here:

https://developer.microsoft.com/en-us/windows/holographic/academy

Deployment

The deployment process should work something like this:

Create some holographic content in Unity using the 3D editor and some scripting Set the Unity build settings to output a Windows Store project Make Unity build the project Open Unitys output with Visual Studio Make Visual Studio compile, build and deploy your app See the app running on an emulator or actual device

Step 1 should be done with the help of Windows Holographic Academy that is linked above.

Step 2 requires changing the follow settings in Unity:

Go to File -> Build Settings and change the platform to Windows Store. If the Switch Platform button is grayed out, the Windows Store platform support was not installed and the easiest way to fix this is to simply uninstall Unity and install it again, making sure that the Windows Store support is enabled during installation. Change SDK to Windows 10, change UWP Build Type to D3D and enable Unity C# Projects. Build the project and look for errors in the console.

Now I had a lot of problems at this point because Parallels supports folder sharing between host OS and virtual OS and I had chosen to store my Unity project in //Documents/HoloLens. The Windows Documents folder is shared between the host and virtual OS by default in Paralles, meaning that file paths in the documents folder starts with the double slash instead of a drive letter, indicating a network path instead of a path on the local machines hard disk. This gave a lot of unpredictable errors and the resulting Visual Studio Project ended up getting compile errors. Therefore save your project in a folder that is not shared with the host os (for example C:/hololens or something like that).

Step 3 is just pressing the build button in Unity.

Step 4 is easy if Unity compiled without any errors, Unity should open a Windows explorer window with the Visual Studio output project in it. Open this project with Visual Studio.

Step 5 gave a lot of problems too. The first thing to do is edit the file called Package.appxmanifest, find the line with TargetDeviceFamily and change the following two attributes: Name=”Windows.Holographic” and MaxVersionTested=”10.0.10586.0″. Change the build configuration dropdown to Release and change the platform configuration dropdown to x86. This should be enough to compile and run the app on the emulator or device, however I had problems getting the device to accept my build and after a lot of poking around I found out that Visual Studio does some magic trickery when pairing the device with the development computer using a PIN code. If you already paired the HoloLens and the development computer with a PIN code outside of Visual Studio, you must first unpair them in the HoloLens settings menu, then build the project in Visual Studio and wait for it to ask for the PIN code, generate the PIN code with the HoloLens and type it in. This should not be a problems if the deviec and computer was unpaired before or if running on the emulator.

Now everything should work and the app should run.

Documentation in Visual Studio

A final note. If you are using Visual Studio for code editing it might be very handy with some Unity documentation inside Visual Studio. In order to get that, you must install the Tools for Unity package and restart Visual Studio:

https://visualstudiogallery.msdn.microsoft.com/8d26236e-4a64-4d64-8486-7df95156aba9

After restarting Visual Studio you can assign a keyboard shortcut to Help.UnityApiReference in Tools -> Options under Environment -> Keyboard.

本文系统(windows)相关术语:三级网络技术 计算机三级网络技术 网络技术基础 计算机网络技术

分页:12
转载请注明
本文标题:HoloLens development on MacOS using Parallels
本站链接:http://www.codesec.net/view/482950.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(windows) | 评论(0) | 阅读(25)