Skip to content

Commit 205e679

Browse files
committed
Activate license task docs
1 parent 6db5e5e commit 205e679

File tree

2 files changed

+73
-90
lines changed

2 files changed

+73
-90
lines changed

docs/02-tasks/02-unity-setup-task.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Another purpose of this task is to activate a license / seat on the agent, shoul
2222
2323
## Inputs
2424
25-
This task supports input variables for configuration.
26-
2725
### unityEditorsPathMode
2826
2927
For the task to run successfully it needs to know where the Unity Hub executable can be found on the agent. This input defines where to look for it.

docs/02-tasks/03-unity-activate-license-task.md

Lines changed: 73 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -6,138 +6,123 @@ sidebar_label: Unity Activate License Task
66

77
# About the Unity Activate License Task
88

9-
This task is used to activate a Untiy Plus/Pro license on the executing agent machine. You can find the task when editing your pipeline by searching for the name `Unity Activate License`.
9+
:::warning
10+
This task has been deprecated and will be removed in an upcoming major release. Please use `Unity Setup Task` instead.
11+
:::
1012

11-
---
13+
This task is used to activate a Untiy Plus/Pro license on the executing agent machine.
1214

13-
## Inputs
15+
## Syntax
1416

15-
This task supports input variables for configuration.
17+
```yaml
18+
# Unity Activate License V1
19+
# Activate editor using a Unity seat
20+
- task: UnityActivateLicenseTask@1
21+
inputs:
22+
username: $(unity.username)
23+
password: $(unity.password)
24+
serial: $(unity.serial)
25+
```
1626
17-
### username
27+
## Inputs
1828
19-
The username, generally a mail address, used to activate the license on the machine.
29+
### username
2030
21-
**Required**: Yes
31+
The username to use for seat activation. This is your Unity ID email.
2232
23-
**Default Value**: -
33+
| YAML | Classic Editor | Required | Default |
34+
|----------------------------|-------------------------------|----------|---------|
35+
| `username` | Username | Yes | - |
2436

2537
### password
2638

27-
The password for the user specified in the `username` input.
28-
29-
:::warning
30-
31-
Use a secure variable for this input. That way the password will be secured and will not appear in clear text in any log output.
32-
33-
:::
34-
35-
**Required**: Yes
39+
The password to use for seat activation. This is your Unity ID password.
3640

37-
**Default Value**: -
41+
| YAML | Classic Editor | Required | Default |
42+
|----------------------------|-------------------------------|----------|---------|
43+
| `password` | Password | Yes | - |
3844

3945
### serial
4046

41-
The Unity Plus/Pro seat serial key used to activate the license on the machine. The seat must have at least one free activation available.
42-
At the time of writing a Unity Plus/Pro seat can be activated on up to two machines. The build task will release the activation every time once
43-
the pipeline has finished.
47+
The serial to use for seat activation. This is the serial for your seat. Obtain it from the Unity dashboard.
4448

45-
:::warning
49+
| YAML | Classic Editor | Required | Default |
50+
|----------------------------|-------------------------------|----------|---------|
51+
| `serial` | Serial | Yes | - |
4652

47-
Use a secure variable for this input. That way the serial will be secured and will not appear in clear text in any log output.
53+
### deactivateSeatOnComplete
4854

49-
:::
55+
Dectivates a seat / license on the agent once the pipeline has completed.
5056

51-
**Required**: Yes
57+
| YAML | Classic Editor | Required | Default |
58+
|----------------------------|-------------------------------|----------|---------|
59+
| `deactivateSeatOnComplete` | Deactivate license when pipeline has finished | No | true |
5260

53-
**Default Value**: -
61+
#### Options:
5462

55-
### unityEditorsPathMode
63+
| Value | Description |
64+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
65+
| true | Deactivate seat / license |
66+
| false | Do not deactivate seat / license |
5667

57-
For the task to run successfully it needs to know where Unity installations are located at on the agent. This input lets you configure,
58-
where the task should look for installations.
68+
### versionSelectionMode
5969

60-
**Required**: Yes
70+
This input defines how to determine the Unity version required to build the project on in the context of this task, which Unity editor version to install and / or actigvate a license with.
6171

62-
**Default Value**: unityHub
72+
| YAML | Classic Editor | Required | Default |
73+
|----------------------------|-------------------------------|----------|---------|
74+
| `versionSelectionMode` | Unity version | Yes | project |
6375

6476
#### Options:
6577

6678
| Value | Description |
6779
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
68-
| unityHub | Uses the Unity Hub default installation path. |
69-
| environmentVariable | Expects an environment variable `UNITYHUB_EDITORS_FOLDER_LOCATION` to exist on the agent and specifying where to find editor installations. |
70-
| specify | Let's you specify a custom path where to lookup editor installations using the input `customUnityEditorsPath`. |
80+
| project | Uses exactly the Unity version that the project was last opened with |
81+
| specify | Let's you specify a Unity version to work with. See also input `version` |
7182

72-
### customUnityEditorsPath
83+
### version
7384

74-
If you are using a custom buld agent you may want to specify a custom path to specify where to look for Unity installations. This input lets you do that.
75-
Make sure to set `unityEditorsPathMode` to `specify` for this input to take effect.
85+
The version of the Unity editor to work with, e.g. `6000.0.30f1`. You can determine the version for your project using the `ProjectVersion.txt` file within your project's `ProjectSettings` folder.
7686

77-
**Required**: Yes, if `unityEditorsPathMode` set to `specify`
78-
79-
**Default Value**: -
87+
| YAML | Classic Editor | Required | Default |
88+
|----------------------------|-------------------------------|----------|---------|
89+
| `version` | Version | Yes, if `versionSelectionMode` is `specify` | - |
8090

8191
### unityProjectPath
8292

83-
Enter the directory path to the Unity project. If no value is entered, the project is assumed to be in the repository root.
84-
85-
**Required**: No
93+
Enter the directory path to the Unity project. If no value is entered, the project is assumed to be in the repository root. Use this input, if your Unity project is nested within subfolders within your repository.
8694

87-
**Default Value**: -
88-
89-
---
95+
| YAML | Classic Editor | Required | Default |
96+
|----------------------------|-------------------------------|----------|---------|
97+
| `unityProjectPath` | Unity project path | No | - |
9098

91-
## Outputs
99+
### unityEditorsLocation
92100

93-
This task provides output variables.
101+
For the task to run successfully it needs to know where the Unity Hub executable can be found on the agent. This input defines where to look for it.
94102

95-
### logsOutputPath
96-
97-
Path to the Unity editor log files generated while executing the task. Use this e.g. to upload logs in case of a failure.
98-
99-
---
100-
101-
## How to use
102-
103-
Here's a simple example of how to use and define the task in your pipeline. For more examples, check the [Examples Collection](./examples.md).
104-
105-
### YAML
106-
107-
In the simple YAML example below we are definiing the task a step in the pipeilne using `- task: UnityActivateLicenseTask@1`. We are also giving the task a reference name using `name: unityactivation`, so we can use it to refernce the output variables of the task in other tasks of the pipeline. E.g. we can output the value of the `logsOutputPath` output variable to the console using `echo $(unityactivation.logsOutputPath)`. For `username`, `password` and `serial` we use shared pipeline variables created previously that contain the user credentials for activating Unity.
108-
109-
```yaml
110-
trigger:
111-
- main
103+
| YAML | Classic Editor | Required | Default |
104+
|----------------------------|-------------------------------|----------|---------|
105+
| `unityEditorsLocation` | Unity editors location | Yes | default |
112106

113-
pool:
114-
name: Unity Windows
115-
116-
variables:
117-
- group: unity-activation-variables
118-
119-
steps:
120-
- task: UnityActivateLicenseTask@1
121-
name: unityactivation
122-
inputs:
123-
username: $(unity.username)
124-
password: $(unity.password)
125-
serial: $(unity.serial)
107+
#### Options:
126108

127-
- script: |
128-
echo $(unityactivation.logsOutputPath)
129-
```
109+
| Value | Description |
110+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
111+
| default | Uses the Unity Hub default installation path for editor installations |
112+
| specify | Let's you specify a custom path where to look for the Unity Hub executable. See also input `unityEditorsLocation` |
130113

131-
### Classic Pipeline Editor
114+
### customUnityEditorsLocation
132115

133-
The classic (visual) editor for Azure Pipelines provides input fields for configuring the task. In the simple example below, we set variables, which we previously defined, for the `username`, `password` and `serial` inputs. For `Unity editors location` we tell the task to use the default Unity Hub installation path to lookup installed Unity editor versions on the agent running our pipeline. We are also leaving the `Unity project path` field empty, since we know our Unity project is in the repository root. We are also assigning a `Reference name` to the task, so we can use it to refernce the output variables in the variables list in other tasks of the pipeline. E.g. to get the value of the `logsOutputPath` output variable and insert it into any other input field of a task we can then use `$(unityactivation.logsOutputPath)`.
116+
Should you have configured `unityEditorsLocation` to `specify`, this input is used to read your custom path.
134117

135-
![Classic Pipeline Designer Task Configuration](../../static/img/unity-activate-license-task/unity-activate-license-classic.png)
118+
| YAML | Classic Editor | Required | Default |
119+
|----------------------------|-------------------------------|----------|---------|
120+
| `customUnityEditorsLocation` | Editors folder location | Yes, if `unityEditorsLocation` is `specify` | - |
136121

137-
---
122+
## Output variables
138123

139-
## Log
124+
This task defines the following output variables, which you can consume in downstream steps, jobs, and stages.
140125

141-
When run and successful the task will provide log output similar to this:
126+
### editorLogFilePath
142127

143-
![Task Log](../../static/img/unity-activate-license-task/unity-activate-license-log.png)
128+
Path to the Unity editor log file generated while executing the task.

0 commit comments

Comments
 (0)