Unity software licensing

Getting started with license key verifications in Unity

Installing the .NET SDK for Unity

The easiest way to add software licensing into your Unity project is by installing our .NET SDK, available open source on GitHub. Depending on the Unity version, the way the client SDK is added will differ. It is outlined in the following tutorial and it is also covered in the video below.

Example key verification

The code below verifies a license key with our API. This example is covered in more detail on this page. If your application needs to work offline, please use this code snippet instead.

// call to activate
var result = Key.Activate(token: auth, productId: 3349, key: "GEBNC-WZZJD-VJIHG-GCMVD", machineCode: "foo");

// obtaining the license key (and verifying the signature automatically).
var license = LicenseKey.FromResponse("RSAPubKey", result);

For more information on how to obtain the parameters, please read more here.

Some of the companies using Cryptolens

Related articles