Queries the entitlements granted to the current user.
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.
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"); } } }
| Method | Description |
|---|---|
| GetAuthToken | Returns the authentication token for the current licensing session. |
| HasEduLicense | Checks whether the current user has an Education license. |
| HasEntitlement | Checks whether the current user is entitled to a specific entitlement. |
| HasEntitlements | Returns which of a list of entitlements are granted to the current user. |
| HasEntitlementsExtended | Returns extended information about a list of entitlements. |
| HasPro | Checks whether the current user has a Unity Pro license. |
| InvokeLicenseUpdateCallbacks | Notifies all components that have registered to act upon licensing changes. |
| IsPersonal | Checks whether the current user has a Unity Personal license. |
| UpdateLicense | Triggers an update to all available license types found on this machine. |