Hololens——开发入门
下面是一些很有用的“传送门”。
Hololens官网:Hololens微软官网
全息学院:微软全息学院
某位Hololens前辈的博客:msp的昌伟哥哥的Hololens经验总结
环境部署
下载地址:官网下载
1.升级Win10
2.安装Visual Studio2015 update 3 或者Visual Studio2017。
3.安装模拟器HoloLens Emulator
4.安装unity
5.安装Vuforia
第一个例子
1.打开unity新建3D项目
2.重置主摄像头的位置全为0,改Clear Flags为Solid Color,Background改为黑色(#000000),Near改为0.85。
3.放一个Cube,改一下Rotation,Position,Scale,保证能出现在摄像头的视野中,然后Ctrl+s保存下。
4.Unity主菜单中选择File > Build Setteings确定是否安装了Windows Store组件,如果没有就点击界面里的下载即可,如果已经安装了就不用管了,下图是已经安装好了的界面。
Unity主菜单中选择 Edit > Project Settings > Quality点击下图中红圈里的箭头选中Fastest。
5.Build Settings窗口中选中Windows Store后点击Player Settings,在Other Settings 里勾中Virtual Reality Supported ,点击Build Settings窗口中的Add Open Senses,最后点击Build,最好新建一个文件夹。
6.用Visual Studio 打开unity生成好的解决方案, 修改下Package.appxmainifest里面的代码,改成红框中的内容(Windows.Holographic),然后改成master,x86以及HoloLens Emulator,如图下所示,最后Ctrl+F5开始执行(不调试),第一次需要多等一会儿:
7.如图成功了