This page concerns the Vuforia Engine API version 9.8 and earlier. It has been deprecated and will no longer be actively updated.
This article describes how to add a license key to your Vuforia Unity, Android, iOS, and UWP projects. Vuforia Engine apps use a unique license key obtained from the Vuforia Engine License Manager. We strongly recommend developers encrypt their key for enhanced security. To learn how to create a license key, refer to the Vuforia License Manager article.
Adding a License Key to a Unity app
After opening your Unity project, perform the following steps:
- In the Window menu, select Vuforia Configuration.
- In the Inspector window, click the Add License button.
The License Manager window opens in a browser. - Click on your project name.
The My License window opens. - Click the license key to copy it to your clipboard.
- In the Inspector window, paste the key into the App License Key field.
Adding a License Key to a Native Vuforia Engine App
Use the AppController.cpp file in the Vuforia Engine Native Samples as a starting point. Use the following to initialize your license key. The licenseKey
should be defined in the namespace of your app. Obtain the license key from the License Manager on the Vuforia Developer Portal and place it as the licenseKey
that is empty by default in the Native Sample:
namespace
{
constexpr char licenseKey[] = "";
}
The license key is used in the initiVuforiaInternal()
method when calling Vuforia::setInitParatmeters()
, which has a slightly different signature for each platform:
iOS |
|
Android |
|
UWP |
|
After setting the licenseKey
in Vuforia::setInitParatmeters()
, Vuforia Engine can be initialized asynchronously with Vuforia::init()
. For full details, please refer to the Getting started pages or consult the AppController.h/cpp files in each native sample packages.