Documentation

Setup Guide Unity HoloLens Plugin

There are only a few steps necessary to add the Wikitude Unity HoloLens Plugin to your existing Unity HoloLens project. This guide will explain them in detail. In general the steps are

  • Import the Wikitude.unitypackage into your project
  • Add the WikitudeCamera and one of the Tracker prefabs to the Unity scene hierarchy and configure their properties
  • Add a custom augmentation to the tracker as a Prefab in the Drawable field of the Trackable
  • Export your project in order to fully integrate the Wikitude API in your Unity HoloLens project

Import the Wikitude.unitypackage

The Wikitude Unity Plugin comes as a standard .unitypackage and can be imported through the usual Unity package import procedure. In your Unity project, open the Assets dropdown menu and choose Import Package -> Custom Package. Select the downloaded Wikitude.unitypackage in the presented open file browser and click open. You should import all items that are part of the Wikitude.unitypackage.

Use the Wikitude Unity plugin

After the Wikitude.unitypackage was imported, its components and scripts can be used to define a custom augmented reality experience. The example section describes in more detail how those prefabs and scripts can be used to do so.

Export to Visual Studio

When building for UWP HoloLens, the following settings need to be enabled to make sure that the SDK is compatible with Unity.

From the Build Settings menu, please make sure that:

  • Target Device is set to PC
  • Build Type is set to D3D
  • Build and Run on is set to Device

Additionally, from the Player Settings -> Other Settings:

  • Graphics APIs is set to Direct3D11
  • Scripting Backend is set to IL2CPP

And from Player Settings -> Publishing Settings:

  • Capabilities has InternetClient and WebCam enabled
  • Additional Microphone capability is required only to enable voice control inside the samples

At this point, the project can be exported to Visual Studio. Once the project is exported, you can build the project for x86.

Unity Requirements and supported versions

Please note that the Wikitude Unity HoloLens Plugin currently supports
  • Unity  2018.4 LTS or higher
  • Rendering engines
    • Direct3D 11