Activation
All actions use a Unity installation, which needs to be activated.
Unity differentiates their methods between personal
and professional
licenses.
Depending on whether you are using a free or paid version of Unity, you will need to follow the steps for either a personal license or a professional license. Alternatively you can provide the url to a License server.
Personal license
Follow these steps if you are using a free version of Unity.
Note: Do NOT follow the steps for the personal license if you have a professional license.
Mental model
- Activate a license for use on Github via a local machine
- Set the license as a secret
Activating a license file
Install Unity Hub on your local machine.
Log into Unity Hub with the Unity account that you are using for CI. Make sure you log into the correct account or you may not activate the correct license.
When prompted, activate your personal license. If you are not prompted, go to
Unity Hub
>Preferences
>Licenses
>Add
and chooseGet a free personal license
. You do not need to install an editor on your local machine.Depending on the host you are using, find the
.ulf
file which is your Unity license in the following paths:- Windows:
C:\ProgramData\Unity\Unity_lic.ulf
- Mac:
/Library/Application Support/Unity/Unity_lic.ulf
- Linux:
~/.local/share/unity3d/Unity/Unity_lic.ulf
If you have issues locating the file, ensure you've logged into Unity Hub AND activated your license. Otherwise the file will not be present. Keep in mind these folders might be hidden by default, you may need to reveal hidden files to see them.
Note: The host platform you use to activate the license does not matter. You only need to get the ulf from the platform that is most convenient to you. For example, using Windows to activate your license and building on Ubuntu on Github is perfectly fine.
- Windows:
Open
Github
><Your repository>
>Settings
>Secrets and Variables
>Actions
.Create the following secrets;
UNITY_LICENSE
- (Copy the contents of your license file into here)UNITY_EMAIL
- (Add the email address that you use to login to Unity)UNITY_PASSWORD
- (Add the password that you use to login to Unity)
Return your personal license in Unity Hub on the local machine you used to ensure you aren't using up one of the seats. You can do this by going to
Unity Hub
>Preferences
>Licenses
and chooseReturn license
on the Personal license listed in the window.
GameCI does not acquire nor store your Unity email, password, or license file contents. They are required for activating the license during build and test steps.
Professional license
- Subscribe to Unity Plus or Unity Pro, and get your Serial Key from the Unity Subscriptions page
- Open
Github
><Your repository>
>Settings
>Secrets
- Create the following secrets;
UNITY_SERIAL
- (Add the serial key from step 1 that looks likeXX-XXXX-XXXX-XXXX-XXXX-XXXX
)UNITY_EMAIL
- (Add the email address that you use to login to Unity)UNITY_PASSWORD
- (Add the password that you use to login to Unity)
GameCI does not acquire nor store your Unity email, password, or serial number. They are required for activating the license during build and test steps.
Note: Do NOT follow the steps for the personal license if you have a professional license.
License Server
If you host your own Unity license server you can provide its url using unityLicensingServer
. A
floating license will be acquired before the build, and returned after.
Example of use:
- uses: game-ci/unity-builder@v4
with:
targetPlatform: WebGL
unityLicensingServer: [url to your license server]
Optional steps
- Verify your license using Activate.
- When using a pro license also use Return License to free up the license allocation after usage.
Note: Test runner and Builder already include these steps.
Next steps
The license can now be used in test and build steps.
You are now ready to start configuring these.