Configuring the Unity Licensing Client
To run the Unity Licensing Client on a user's computer, the Services Configuration file (services-config.json
) must be copied from the Licensing Server.
You can customize the configuration, if needed.
Copying the configuration file
A JSON file named services-config.json
contains the configuration for the Unity Licensing Client. Running the server setup command generates this file on the licensing server. The generated JSON file contains the following configuration:
{
"licensingServiceBaseUrl": "http://SERVER-IP-ADDRESS:PORT",
"enableEntitlementLicensing": true,
"hubEnableWorkOffline": true,
"clientConnectTimeoutSec": 60,
"clientHandshakeTimeoutSec": 30
}
Copy services-config.json
from the licensing server to each of the client computers that will run the Unity Editor. Copy the file to the path specified in the following table. If the folders don't exist, create them.
Platform | Services Configuration Path |
---|---|
Windows | %PROGRAMDATA%\Unity\config\ |
macOS | /Library/Application Support/Unity/config/ |
Linux | /usr/share/unity3d/config/ |
Supported configuration keys
If you need to customize the client configuration, you can set the following keys:
Key | Description |
---|---|
licensingServiceBaseUrl | Network address of floating licensing server. The licensing client connects to different endpoints on this address to request a lease and a license. |
enableEntitlementLicensing | Enables entitlement licensing. Changing this setting has no impact if your Unity Editor version is 2022.1 or later. Don't change this value without guidance from Unity Support. |
hubEnableWorkOffline | Specifies whether the client can check out a floating license to work offline. |
clientConnectTimeoutSec | Specifies the timeout period (in seconds) for the Editor to connect to the Unity Licensing Client before the operation terminates. This timeout applies both to launching the Unity Licensing Client and establishing a connection between processes.
|
clientHandshakeTimeoutSec | Specifies the timeout period (in seconds) to establish a handshake API call to the Unity Licensing Client before the operation terminates.
|
clientResolveEntitlementsTimeoutSec | Specifies the timeout period (in seconds) for the Editor to query the Unity Licensing Client for entitlements before the operation terminates.
|
clientUpdateLicenseTimeoutSec | Specifies the timeout period (in seconds) for the Editor to make an update call to the licensing API before the operation terminates.
|
licensingServiceTimeoutSec | Applies to server version 1.11 or later. Sets timeout for receiving a response from the licensing server, in seconds. Default value is 60 seconds. Valid values are from 10 through 300. In version 1.10 and earlier, this timeout was fixed at 10 seconds. |
toolset | Specifies the product license you want to request from the licensing server. The server serves one product license at a time to clients. You can supply a comma-separated string, in order of preferred licenses. To view all available product identifiers, go to the Server Administration Status Page and view the list under licenseEntitlementGroupId . The server processes each license in the order you specify. If a license isn't available, the server goes to the next license in the list. If you don't specify a toolset value, the server serves the default toolset.For more information on the default toolset, refer to Advanced Server Configuration. For information on how server license changes affects toolset configuration, refer to: - Impact of license updates on client configuration - Impact of license renewals on client configuration. |
licenseClientApplicationPath | Full path of the Unity Licensing Client executable. Not required if using Unity Hub version 2.3.0 or later or Unity Editor 2019.2 or later. |
enableFloatingApi | Enables the floating license API in the client. Set this flag only if you are using Unity Licensing Client version 1.3.0 or earlier. |
Validating the configuration file
Make sure the JSON in your configuration file is syntactically valid after each change. You can use any JSON validation tool or run a console command like the following:
python -m json.tool services-config.json
If validation succeeds, the console displays the contents of the JSON file. If validation fails, the console displays an error.
Testing the license client
Before you test the Unity Licensing Client, make sure you know the location of your Unity Editor. Refer to Locate the Editor program file. The default installation paths for the Unity Editor are:
- Windows:
"C:\Program Files\Unity\Hub\Editor\<version>\Editor\Unity.exe"
- macOS:
/Applications/Unity/Hub/Editor/<version>/Unity.app
- Linux:
/Applications/Unity/Hub/Editor/<version>/Unity.app
Follow these steps to test the client configuration:
Open a command prompt (Windows) or Terminal application (masOS).
Go to the Unity Licensing Client directory, which is within the Editor directory:
- Windows:
<UnityEditorDir>\Data\Resources\Licensing\Client
- macOS (Editor versions 2021.3.19f1 or later):
<UnityEditorDir>/Contents/Frameworks/UnityLicensingClient.app/Contents/MacOS/
- macOS (Editor versions earlier than 2021.3.19f1):
<UnityEditorDir>/Contents/Frameworks/UnityLicensingClient.app/Contents/Resources/
- Linux:
<UnityEditorDir>/Data/Resources/Licensing/Client/
- Windows:
Run the following command:
Windows:
.\Unity.Licensing.Client.exe --acquire-floating
macOS:
./Unity.Licensing.Client --acquire-floating
Linux:
./Unity.Licensing.Client --acquire-floating
If the configuration is valid, the server assigns a floating license with a token identifier. The console output resembles the following example:
Trying to acquire floating license from: 10.1.34.126 ...
License lease Created with token e8b1afba-895d-4c54-aa50-5eadcc4d95a7.
Expires: July 12, 2019 6:47:57 PM