Add a License Key to Your Vuforia Engine App

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.  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:

  1. In the Window menu, select Vuforia Configuration. (CMD+Shift+V or Ctrl+Shift+V)
  2. In the Inspector window, click the Add License button. 
    The License Manager window opens in a browser.
  3. Click on your project name.
    The My License window opens.
  4. Click the license key to copy it to your clipboard.
  5. In the Inspector window, paste the key into the App License Key field. 

Add a license key in a script

You can add the license key before loading your first scene and before starting Vuforia with:

void Awake()
    VuforiaConfiguration.Instance.Vuforia.LicenseKey = "MyLicenseKey";

Add a License Key to a Native Vuforia Engine App

Use the AppController.cpp file in the Vuforia Engine Native Samples as a starting point. The license key is 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 license key in the Native Sample. Use the following to initialize your license key:

    constexpr char licenseKey[] = "";

The license key is managed by the Engine and configured with VuLicenseConfig

// Add license key to engine configuration
auto licenseConfig = vuLicenseConfigDefault();
licenseConfig.key = licenseKey;
vuEngineConfigSetAddLicenseConfig(configSet, &licenseConfig);

After setting the license key configuration, Vuforia Engine can be started with vuEngineStart. For full details, please refer to theDevelopment Environments guides or consult the AppController.h/cpp files in each native sample packages.