Skip to content

Commit e11cd24

Browse files
committed
Update get project version task docs
1 parent 26eca91 commit e11cd24

File tree

1 file changed

+15
-53
lines changed

1 file changed

+15
-53
lines changed

docs/02-tasks/07-unity-get-project-version-task.md

Lines changed: 15 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,72 +8,34 @@ sidebar_label: Unity Get Project Version Task
88

99
This task will find the Unity Editor version the project was last opened with. This is especially useful
1010
when you need to perform steps in your pipeline that depend on which Unity version is required for the project to build
11-
and run. You can find the task when editing your pipeline by searching for the name `Unity Get Project Version`.
11+
and run.
1212

13-
---
13+
## Syntax
1414

15-
## Inputs
15+
```yaml
16+
# Unity Get Project Version Task V1
17+
# Get the project's Unity version
18+
- task: UnityGetProjectVersionTask@1
19+
```
1620
17-
This task supports input variables for configuration.
21+
## Inputs
1822
1923
### unityProjectPath
2024
21-
Enter the directory path to the Unity project. If no value is entered, the project is assumed to be in the repository root.
25+
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.
2226
23-
**Required**: No
27+
| YAML | Classic Editor | Required | Default |
28+
|----------------------------|-------------------------------|----------|---------|
29+
| `unityProjectPath` | Unity project path | No | - |
2430

25-
**Default Value**: -
26-
27-
---
31+
## Output variables
2832

29-
## Outputs
30-
31-
This task provides output variables.
33+
This task defines the following output variables, which you can consume in downstream steps, jobs, and stages.
3234

3335
### projectVersion
3436

3537
The project version found by the task for the specified Unity project.
3638

3739
### projectVersionRevision
3840

39-
The Unity editor version revision found by the task for the specified Unity project.
40-
41-
---
42-
43-
## How to use
44-
45-
### YAML
46-
47-
In the simple YAML example below we are definiing the task a step in the pipeilne using `- task: UnityGetProjectVersionTask@1`. We are also giving the task a reference name using `name: unitygetprojectversion`, 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 `projectVersion` output variable to the console using `echo $(unitygetprojectversion.projectVersion)`.
48-
49-
```yaml
50-
trigger:
51-
- main
52-
53-
pool:
54-
name: Unity Windows
55-
56-
steps:
57-
- task: UnityGetProjectVersionTask@1
58-
name: unitygetprojectversion
59-
60-
- script: |
61-
echo $(unitygetprojectversion.projectVersion)
62-
```
63-
64-
### Classic Pipeline Editor
65-
66-
The classic (visual) editor for Azure Pipelines provides input fields for configuring the task. In the simple example below, we are 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 `projectVersion` output variable and insert it into any other input field of a task we can then use `$(unitygetprojectversion.projectVersion)`.
67-
68-
![Classic Pipeline Designer Task Configuration](../../static/img/unity-get-project-version-task/get-project-version-classic.png)
69-
70-
import Tabs from '@theme/Tabs';
71-
import TabItem from '@theme/TabItem';
72-
73-
---
74-
75-
## Log
76-
77-
When run and successful the task will provide log output similar to this:
78-
79-
![Task Log](../../static/img/unity-get-project-version-task/get-project-version-log.png)
41+
The Unity editor version revision found by the task for the specified Unity project.

0 commit comments

Comments
 (0)