You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
:::
10
12
11
-
---
13
+
This task is used to activate a Untiy Plus/Pro license on the executing agent machine.
12
14
13
-
## Inputs
15
+
## Syntax
14
16
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
+
```
16
26
17
-
### username
27
+
## Inputs
18
28
19
-
The username, generally a mail address, used to activate the license on the machine.
29
+
### username
20
30
21
-
**Required**: Yes
31
+
The username to use for seat activation. This is your Unity ID email.
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
59
69
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.
| 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` |
71
82
72
-
### customUnityEditorsPath
83
+
### version
73
84
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.
76
86
77
-
**Required**: Yes, if `unityEditorsPathMode` set to `specify`
| `version` | Version | Yes, if `versionSelectionMode` is `specify` | - |
80
90
81
91
### unityProjectPath
82
92
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.
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.
94
102
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.
| 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` |
130
113
131
-
### Classic Pipeline Editor
114
+
### customUnityEditorsLocation
132
115
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.
0 commit comments