|
| 1 | +import unityHubPreferencesLicensesAddButton from '/assets/images/unity-hub-preferences-licenses-add-button.png'; |
| 2 | + |
1 | 3 | # Activation
|
2 | 4 |
|
3 |
| -All actions use a Unity installation, which needs to be activated. |
| 5 | +All Unity actions require activation. |
| 6 | + |
| 7 | +### Choosing the Right Activation Method |
| 8 | + |
| 9 | +To activate Unity, select the method that matches your license type: |
4 | 10 |
|
5 |
| -Unity differentiates their methods between `personal` and `professional` licenses. |
| 11 | +- If you're using the **free version**, follow the steps for a |
| 12 | + [Personal License](#personal-license). |
| 13 | +- If you're using the **paid version**, such as Unity Plus or Pro, refer to the instructions for a |
| 14 | + [Professional License](#professional-license). |
| 15 | +- For organizations using a **license server**, you can provide the server's URL as detailed in the |
| 16 | + [License Server](#license-server) section. |
6 | 17 |
|
7 |
| -Depending on whether you are using a free or paid version of Unity, you will need to follow the |
8 |
| -steps for either a [personal license](#personal-license) or a |
9 |
| -[professional license](#professional-license). Alternatively you can provide the url to a |
10 |
| -[License server](#license-server). |
| 18 | +Choose the appropriate method to ensure your Unity environment is activated and ready for use. |
11 | 19 |
|
12 | 20 | ## Personal license
|
13 | 21 |
|
14 |
| -Follow these steps if you are using a free version of Unity. |
| 22 | +Follow these steps if you are using the free version of Unity. |
15 | 23 |
|
16 |
| -> _**Note:** Do NOT follow the steps for the personal license if you have a professional license._ |
| 24 | +> _**Note:** Do not follow the steps for the personal license if you have a professional license._ |
| 25 | +
|
| 26 | +### Mental Model |
| 27 | + |
| 28 | +1. **Activate the license locally**: Use Unity Hub to create a `.ulf` license file linked to your |
| 29 | + Unity account. |
| 30 | +2. **Add the license to GitHub**: Store the `.ulf` file and Unity credentials as GitHub secrets for |
| 31 | + use in CI builds. |
17 | 32 |
|
18 |
| -#### Mental model |
| 33 | +### Setting Up Your Unity License |
19 | 34 |
|
20 |
| -1. Activate a license for use on Github via a local machine |
21 |
| -2. Set the license as a secret |
| 35 | +1. **Install Unity Hub**: Download and install [Unity Hub](https://unity.com/download) on your local |
| 36 | + machine. |
| 37 | +2. **Log in to Unity Hub**: Use the Unity account linked to your CI setup to log in. Ensure you're |
| 38 | + using the correct account to activate the intended license. |
| 39 | +3. **Activate Your License**: Manually activate by navigating to: |
22 | 40 |
|
23 |
| -#### Activating a license file |
| 41 | + - `Unity Hub` > `Preferences` > `Licenses` and click the `Add` button |
| 42 | + - Select **Get a free personal license**. |
24 | 43 |
|
25 |
| -1. Install [Unity Hub](https://unity.com/download) on your local machine. |
26 |
| -2. Log into Unity Hub with the Unity account that you are using for CI. Make sure you log into the |
27 |
| - correct account or you may not activate the correct license. |
28 |
| -3. When prompted, activate your personal license. If you are not prompted, go to `Unity Hub` > |
29 |
| - `Preferences` > `Licenses` > `Add` and choose `Get a free personal license`. You do not need to |
30 |
| - install an editor on your local machine. |
31 |
| -4. Depending on the host you are using, find the `.ulf` file which is your Unity license in the |
32 |
| - following paths: |
| 44 | + :::info Ensure File Creation |
| 45 | + |
| 46 | + Even if a license appears in Unity Hub, a `.ulf` file may not have been created. To ensure the |
| 47 | + file is generated, make sure to click the `Add` button and proceed with the activation steps. Do |
| 48 | + not skip this step. |
| 49 | + |
| 50 | + <img |
| 51 | + src={unityHubPreferencesLicensesAddButton} |
| 52 | + alt="Unity Hub interface showing the Preferences window with the Licenses tab selected and the Add button highlighted" |
| 53 | + /> |
| 54 | + |
| 55 | +4. **Locate the `.ulf` file**: Depending on your operating system, the Unity license file will be |
| 56 | + located in one of these paths: |
33 | 57 |
|
34 | 58 | - Windows: `C:\ProgramData\Unity\Unity_lic.ulf`
|
35 | 59 | - Mac: `/Library/Application Support/Unity/Unity_lic.ulf`
|
36 | 60 | - Linux: `~/.local/share/unity3d/Unity/Unity_lic.ulf`
|
37 | 61 |
|
38 |
| - If you have issues locating the file, ensure you've logged into Unity Hub AND activated your |
39 |
| - license. Otherwise the file will not be present. Keep in mind these folders might be hidden by |
40 |
| - default, you may need to reveal hidden files to see them. |
| 62 | + If you have trouble locating the `.ulf` file, follow these steps: |
41 | 63 |
|
42 |
| - > **Note:** The host platform you use to activate the license does not matter. You only need to |
43 |
| - > get the ulf from the platform that is most convenient to you. For example, using Windows to |
44 |
| - > activate your license and building on Ubuntu on Github is perfectly fine. |
| 64 | + - **Check activation**: Ensure you’ve logged into Unity Hub and completed the step "3. Activate |
| 65 | + Your License". |
| 66 | + - **Reveal hidden files**: These folders may be hidden by default, so enable the option to view |
| 67 | + hidden files in your file explorer. |
| 68 | + - **Use any platform**: Licenses are not tied to a specific Unity version or platform. You can |
| 69 | + activate the license on any operating system, such as Windows, and use it for builds on another |
| 70 | + platform, like Ubuntu. Simply retrieve the `.ulf` file from the platform most convenient for |
| 71 | + you. |
45 | 72 |
|
46 |
| -5. Open `Github` > `<Your repository>` > `Settings` > `Secrets and Variables` > `Actions`. |
47 |
| -6. Create the following secrets; |
48 |
| - - `UNITY_LICENSE` - _(Copy the contents of your license file into here)_ |
49 |
| - - `UNITY_EMAIL` - _(Add the email address that you use to login to Unity)_ |
50 |
| - - `UNITY_PASSWORD` - _(Add the password that you use to login to Unity)_ |
51 |
| -7. Return your personal license in Unity Hub on the local machine you used to ensure you aren't |
52 |
| - using up one of the seats. You can do this by going to `Unity Hub` > `Preferences` > `Licenses` |
53 |
| - and choose `Return license` on the Personal license listed in the window. |
| 73 | +5. **Add Secrets to GitHub**: Navigate to `GitHub` > `<Your repository>` > `Settings` > |
| 74 | + `Secrets and Variables` > `Actions`. Then, create the following secrets: |
| 75 | + |
| 76 | + - **`UNITY_LICENSE`**: Copy and paste the contents of your `.ulf` license file |
| 77 | + - **`UNITY_EMAIL`**: Enter the email address associated with your Unity account |
| 78 | + - **`UNITY_PASSWORD`**: Enter the password for your Unity account |
54 | 79 |
|
55 | 80 | **GameCI does not acquire nor store your Unity email, password, or license file contents. They are
|
56 | 81 | required for activating the license during build and test steps.**
|
|
0 commit comments