Skip to content

Instantly share code, notes, and snippets.

@meyu
Last active April 19, 2018 05:19
Show Gist options
  • Save meyu/f9dc0564fc973156d31ddb02d7c8371b to your computer and use it in GitHub Desktop.
Save meyu/f9dc0564fc973156d31ddb02d7c8371b to your computer and use it in GitHub Desktop.
開發要點筆記中

Few things of Hololens development

Required Softwares

On your PC

  • Windows 10
    1. Go to Settings > Update & security > For developers
    2. Enable Developer mode.
  • Visual Studio 2017 when installing...
    1. Select the Universal Windows Platform development workload.
    2. Select the Game Development with Unity workload, and deselect the Unity Editor optional component.
    3. Select the Desktop development with C++ workload.
  • Unity 2017.4 when installing...
    • Make sure to select the Windows Store .NET Scripting Backend.
  • Hololens
    1. Open Microsoft Store app.
    2. Search Hololens app and install it.

On your Hololens

Setting the project

On your PC in Unity

  1. On the Edit > Project Settings > Quality page.
    • Select the dropdown under the Windows Store logo and select Fastest.
  2. On the Edit > Project Settings > Player page, click on the Windows Store tab.
    • expand the XR Settings group, in the Rendering section, check the Virtual Reality Supported to add a new Virtual Reality SDKs list and confirm Windows Mixed Reality is listed.
    • expand the Other Settings group, make sure that Scripting Backend is set to .NET.
  3. Open File > Build Settings window.
    • Change Platform to Universal Windows Platform
    • Click Switch Platform.

Find the Camera component in the Inspector panel

On your PC in Unity

  1. change the Clear Flags dropdown to Solid Color.
  2. change the Background color to RGBA (0, 0, 0, 0).
  3. change the Near Clip Plane field to the HoloLens recommended 0.85.

Verify on device from Unity editor

On your HoloLens

  1. Run the Holographic Remoting Player app.
  2. Remember the IP address of your Hololens.

On your PC in Unity

  1. Open Window > Holographic Emulation.
  2. Change Emulation Mode to Remote to Device.
  3. Enter the IP address of your HoloLens, click Connect.
  4. Click Play in the Unity editor.

Build and deploy to device from Visual Studio

On your PC in Unity

  1. Open File > Build Settings window
  2. Click Add Open Scenes to add the scene
  3. Change Platform to Universal Windows Platform and click Switch Platform
  4. UWP Build Type should be D3D
  5. UWP SDK could be left at Latest installed
  6. Check Unity C# Projects under Debugging.
  7. Click Build.

On your PC in Visual Studio

  1. Open the generated Visual Studio solution that Unity just built.
  2. On the top toolbar, change the target to Release and X86, and change the deployment target to Remote Machine.
  3. Enter the IP address and change Authentication Mode to Universal (Unencrypted Protocol) for HoloLens
  4. Click Debug > Start without debugging.

參考資源

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment