Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LicensingUtility

Queries the entitlements granted to the current user.
Read time 1 minuteLast updated 8 days ago

Definition

public static class LicensingUtility

Remarks

An entitlement is a string that identifies a permission, for example
com.unity.editor.ui
. Unity resolves entitlements through the licensing system, which the Editor cannot always reach.
Every entitlement check on this class fails closed: an unreachable licensing system reads the same as an entitlement that is not granted. This is the right default for gating a feature, where both cases deny access.
Use LicensingUtility.HasEntitlement for a single entitlement, LicensingUtility.HasEntitlements for several, and LicensingUtility.HasEntitlementsExtended when you need the license files behind an entitlement or the custom data attached to it.

Examples

using UnityEditor.Licensing;using UnityEngine;static class LicenseReport{ public static void LogEditorEntitlements() { // An unreachable licensing system returns an empty array, the same as nothing being granted. string[] granted = LicensingUtility.HasEntitlements(new[] { "com.unity.editor.ui", "com.unity.editor.disable-splash-screen", }); foreach (var entitlement in granted) { Debug.Log($"{entitlement} is granted"); } }}

Static Methods

Method

Description

GetAuthTokenReturns the authentication token for the current licensing session.
HasEduLicenseChecks whether the current user has an Education license.
HasEntitlementChecks whether the current user is entitled to a specific entitlement.
HasEntitlementsReturns which of a list of entitlements are granted to the current user.
HasEntitlementsExtendedReturns extended information about a list of entitlements.
HasProChecks whether the current user has a Unity Pro license.
InvokeLicenseUpdateCallbacksNotifies all components that have registered to act upon licensing changes.
IsPersonalChecks whether the current user has a Unity Personal license.
UpdateLicenseTriggers an update to all available license types found on this machine.