将应用部署到Hololens

一、用Hololens设备直接连接Unity并进行调试

  • 要有一台Hololens
  • Hololens上要安装Holographics Remoting Player软件(在Hololens应用商店下载)

启动Holographics Remoting Player,会出现该台设备的IP地址: 


打开Unity项目,菜单 > Window > Holographic Emulation,如图: 
打开Hololens远程调试器 
Mac版本的Unity暂不支持

会出现远程连接面板,按下图进行设置,IP请替换为上一步得到的IP,如图: 
远程连接面板

点击”connect”按钮后,再点击Unity的”Play”按钮。

二、编译和部署全息应用程序

通过Wi-Fi将应用部署到Hololens真机

  1. 在Visual Studio的编译选项栏里,将设备这一下拉框中选择 Remote Machine
  2. 在弹出的对话框中输入 Hololens的IP地址 (Hololens 和你的笔记本需要加入同一个Wi-Fi网络),然后更改Authentication Mode 为 Universal(未加密协议)
  3. 选择Visual Studio 的菜单目录 Debug > Start without debugging. 如果这是你第一次从你手上的笔记本部署应用到Hololens中,你需要先将你的Hololens和你的笔记本做一次配对,具体操作参阅 pair it with Visual Studio

 通过USB将应用部署到Hololens真机

  1. 在Visual Studio的编译选项栏里,将设备这一下拉框中选择 Device

  2. 选择Visual Studio 的菜单目录 Debug > Start without debugging.

 通过USB将应用部署到Hololens模拟器

  1. 在Visual Studio的编译选项栏里,将设备这一下拉框中选择 HoloLens Emulator
  2. 选择Visual Studio 的菜单目录 Debug > Start without debugging.
注:hololens必须和你的电脑连接同一个网络,否则会造成无法访问等各种错误。


猜你喜欢

转载自blog.csdn.net/qiao_19/article/details/79438570