Hololens 2#
Summary#
Hololens 2
is an AR device meant for professionals, running the Windows Holographic
OS.Set up#
Note
The group does not have a universal SPL account setup yet.
Note
In case the holograms seem to be buggy or jumping around, please ensure the cameras and the inner glasses are clean. If the device cannot track your eyes or the environment correctly, the experience may be disrupted.
Also, too many apps may be running in the background. To close them, either reboot the Hololens, or connect through its IP and access the Device Portal
to force them shut.
Develop (Unity)#
Note
Beforehand, ensure that the correct tools and add-ons are installed. Also, the developer mode must be enabled.
Once the project has been tested, it can then be compiled and deployed on the device in a simple manner.
Access File -> Build Settings
:

Build settings#
Ensure that the platform is the Universal Windows Platform
(else select it and click Switch Platform
).
Note
If the build fails, the error messages can be seen under the Console
panel,
Through USB#
Build
and create and select a build
folder..sln
project through Visual Studio
.Release
and platform to ARM
or ARM64
and target to Device
. Then select the UWP
solution (normally as default) and try to run.
USB build#
Note
The device is not paired at first. Visual Studio
will guide you to pair it by asking for a developer code.
Under the Hololens, go to Settings -> Update & Security -> For developers
and click on Pair
.
Through WiFi#
Device Portal
.Remote device
, then enter the Hololens IP under Portal Address
. The name and password are those linked to the headset, i.e. the one used to connect directly to it through the IP.Note
You can retrieve the Hololens IP by saying What's my IP ?
while wearing the headset.
The build directly from Unity will not work if the device portal system is not working under the PC. At the time of writing, Sinf’s PCs are not up to date enough to enable it.
To get it working through Visual Studio
, open the .sln
project and select Remote Machine
as target.
Click on the right of it to develop the list then {ProjectName} Debug Properties -> Debugging -> Machine name -> enter Hololens IP
.
It is now possible to run the program remotely.
Deploy#
The build through Unity will deploy the app automatically.
If done through Visual Studio
, stopping the program will uninstall the app.
If connected by USB, it is possible to disconnect the cable without stopping the program. It will stay in memory, but of course is not the best solution …
To correctly deploy in either case, simply go under the Build
tab and select Deploy solution
.