Skip to content

Commit c188397

Browse files
authored
Release new examples (#8)
* Update azure-pipelines.yml for Azure Pipelines (#3) * Create Standalone build example (#5) * Update README * Update azure-pipelines.yml for Azure Pipelines (#3) (#4) * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Add htaccess file for https redirect * Add GA * Create first standalone example * Update examples (#7) * Update README * Update azure-pipelines.yml for Azure Pipelines (#3) (#4) * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Add htaccess file for https redirect * Add GA * Create first standalone example * Add roadmap page and reduze image file sizes * Update build task docs to use yaml code instead of image * Update exampel yaml * Remove tabs from remaining docs * Fix typo
1 parent 3e7106f commit c188397

27 files changed

+176
-144
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This repository contains the documentation website for [Unity Tools for Azure De
1313

1414
## Contributions
1515

16-
Found and fixed a bug or improvement on something? Contributions are welcome! Please target your pull request
16+
Found and fixed a bug or improved on something? Contributions are welcome! Please target your pull request
1717
against the `development` branch.
1818

1919
## Development Instructions

docs/example-standalone-0.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,45 +31,45 @@ trigger:
3131
# that have the required Unity versions installed and any required SDKs for target platforms
3232
# configured.
3333
pool:
34-
name: 'Unity Windows'
34+
name: Unity Windows
3535

36-
# Adds a pipeline variables library to the pipeline that contains
36+
# Adds a shared pipeline variables library to the pipeline that contains
3737
# authentication variables for activating a Unity editor with a Unity Plus / Pro seat.
3838
variables:
39-
- group: 'unity-activation-variables'
39+
- group: unity-activation-variables
4040

4141
steps:
4242
# Before we build we activate a Unity Plus/Pro seat on the agent, only for the duration
4343
# of the pipeline execution. That way we can e.g. get rid of the Unity splash screen in our build.
4444
- task: UnityActivateLicenseTask@1
45-
name: 'unityactivation'
45+
name: unityactivation
4646
inputs:
47-
username: '$(unity.username)'
48-
password: '$(unity.password)'
49-
serial: '$(unity.serial)'
47+
username: $(unity.username)
48+
password: $(unity.password)
49+
serial: $(unity.serial)
5050

5151
# Build the Unity project to standalone. Since we are running on a Windows agent, this will produce
5252
# an .exe executable and any dependency files needed.
5353
- task: UnityBuildTask@3
5454
inputs:
55-
buildTarget: 'standalone'
56-
outputPath: '$(Build.BinariesDirectory)'
57-
outputFileName: 'mygame'
55+
buildTarget: standalone
56+
outputPath: $(Build.BinariesDirectory)
57+
outputFileName: mygame
5858

5959
# Copy build output files to artifact staging directory.
6060
- task: CopyFiles@2
6161
inputs:
62-
SourceFolder: '$(Build.BinariesDirectory)'
62+
SourceFolder: $(Build.BinariesDirectory)
6363
Contents: '**'
64-
TargetFolder: '$(Build.ArtifactStagingDirectory)'
64+
TargetFolder: $(Build.ArtifactStagingDirectory)
6565
CleanTargetFolder: true
6666
OverWrite: true
6767

6868
# Finally publish all items in artifact staging to the Azure Pipelines
6969
# artifact storage. They will be available for sharing and/or further processing there.
7070
- task: PublishBuildArtifacts@1
7171
inputs:
72-
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
73-
ArtifactName: 'drop'
74-
publishLocation: 'Container'
72+
PathtoPublish: $(Build.ArtifactStagingDirectory)
73+
ArtifactName: drop
74+
publishLocation: Container
7575
```

docs/unity-activate-license-task.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -101,32 +101,37 @@ Path to the Unity editor log files generated while executing the task. Use this
101101

102102
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).
103103

104-
import Tabs from '@theme/Tabs';
105-
import TabItem from '@theme/TabItem';
106-
107-
<Tabs
108-
lazy
109-
groupId="pipeline-editing-tool"
110-
defaultValue="yaml"
111-
values={[
112-
{label: 'YAML', value: 'yaml'},
113-
{label: 'Classic Editor', value: 'classic'}
114-
]}>
115-
<TabItem value="yaml">
116-
<p>
117-
In the simple YAML example below we are definiing the task a step in the pipeilne using <code>- task: UnityActivateLicenseTask@1</code>. We are also
118-
giving the task a reference name using <code>name: unityactivation</code>, 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 <code>logsOutputPath</code> output variable to the console using <code>echo $(unityactivation.logsOutputPath)</code>. For <code>username</code>, <code>password</code> and <code>serial</code> we use shared pipeline variables created previously that contain the user credentials for activating Unity.
119-
</p>
120-
<img src="../static/img/unity-activate-license-task/unity-activate-license-yaml.png" alt="Classic Pipeline YAML Task Configuration"/>
121-
</TabItem>
122-
<TabItem value="classic">
123-
<p>
124-
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 <code>username</code>, <code>password</code> and <code>serial</code> inputs. For <code>Unity editors location</code> 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 <code>Unity project path</code> field empty, since we know our Unity project is in the repository root. We are also assigning a <code>Reference name</code> 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 <code>logsOutputPath</code> output variable and insert it into any other input field of a task we can then use <code>$(unityactivation.logsOutputPath)</code>.
125-
</p>
126-
127-
<img src="../static/img/unity-activate-license-task/unity-activate-license-classic.png" alt="Classic Pipeline Designer Task Configuration"/>
128-
</TabItem>
129-
</Tabs>
104+
### YAML
105+
106+
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.
107+
108+
```yaml
109+
trigger:
110+
- main
111+
112+
pool:
113+
name: Unity Windows
114+
115+
variables:
116+
- group: unity-activation-variables
117+
118+
steps:
119+
- task: UnityActivateLicenseTask@1
120+
name: unityactivation
121+
inputs:
122+
username: $(unity.username)
123+
password: $(unity.password)
124+
serial: $(unity.serial)
125+
126+
- script: |
127+
echo $(unityactivation.logsOutputPath)
128+
```
129+
130+
### Classic Pipeline Editor
131+
132+
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)`.
133+
134+
![Classic Pipeline Designer Task Configuration](../static/img/unity-activate-license-task/unity-activate-license-classic.png)
130135

131136
---
132137

docs/unity-build-task.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -169,32 +169,34 @@ Path to the Unity editor log files generated while executing the task. Use this
169169

170170
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).
171171

172-
import Tabs from '@theme/Tabs';
173-
import TabItem from '@theme/TabItem';
174-
175-
<Tabs
176-
lazy
177-
groupId="pipeline-editing-tool"
178-
defaultValue="yaml"
179-
values={[
180-
{label: 'YAML', value: 'yaml'},
181-
{label: 'Classic Editor', value: 'classic'}
182-
]}>
183-
<TabItem value="yaml">
184-
<p>
185-
In the simple YAML example below we are definiing the task a step in the pipeilne using <code>- task: UnityBuildTask@3</code>. We are also
186-
giving the task a reference name using <code>name: unitybuild</code>, 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 <code>logsOutputPath</code> output variable to the console using <code>echo $(unitybuild.logsOutputPath)</code>. For <code>buildTarget</code> we specify that Unity should target the <code>standalone</code> platform. Our output file will be named <code>drop.exe</code> in this example.
187-
</p>
188-
<img src="../static/img/unity-build-task/unity-build-yaml.png" alt="Classic Pipeline YAML Task Configuration"/>
189-
</TabItem>
190-
<TabItem value="classic">
191-
<p>
192-
The classic (visual) editor for Azure Pipelines provides input fields for configuring the task. In the simple example below, we set <code>Build target</code> to <code>Standalone (agent-based)</code>, that means if our pipeline runs on a Windows agent we get a Windows built and if on a mac we'll get a macOS build. We are also assigning a <code>Reference name</code> 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 <code>logsOutputPath</code> output variable and insert it into any other input field of a task we can then use <code>$(unitybuild.logsOutputPath)</code>. Everything else we are leaving at the defaults.
193-
</p>
194-
195-
<img src="../static/img/unity-build-task/unity-build-classic.png" alt="Classic Pipeline Designer Task Configuration"/>
196-
</TabItem>
197-
</Tabs>
172+
### YAML
173+
174+
In the simple YAML example below we are definiing the task a step in the pipeilne using `- task: UnityBuildTask@3`. We are also giving the task a reference name using `name: unitybuild`, 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 $(unitybuild.logsOutputPath)`. For `buildTarget` we specify that Unity should target the `standalone` platform. Our output file will be named `drop.exe` in this example.
175+
176+
```yaml
177+
trigger:
178+
- main
179+
180+
pool:
181+
name: Unity Windows
182+
183+
steps:
184+
- task: UnityBuildTask@3
185+
name: unitybuild
186+
inputs:
187+
buildTarget: standalone
188+
outputPath: $(Build.BinariesDirectory)
189+
outputFileName: drop
190+
191+
- script: |
192+
echo $(unitybuild.logsOutputPath)
193+
```
194+
195+
### Classic Pipeline Editor
196+
197+
The classic (visual) editor for Azure Pipelines provides input fields for configuring the task. In the simple example below, we set `Build target` to `Standalone (agent-based)`, that means if our pipeline runs on a Windows agent we get a Windows built and if on a mac we'll get a macOS build. 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 `$(unitybuild.logsOutputPath)`. Everything else we are leaving at the defaults.
198+
199+
![Classic Pipeline Designer Task Configuration](../static/img/unity-build-task/unity-build-classic.png)
198200

199201
---
200202

docs/unity-cmd-task.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -81,32 +81,33 @@ Path to the Unity editor log files generated while executing the task. Use this
8181

8282
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).
8383

84-
import Tabs from '@theme/Tabs';
85-
import TabItem from '@theme/TabItem';
86-
87-
<Tabs
88-
lazy
89-
groupId="pipeline-editing-tool"
90-
defaultValue="yaml"
91-
values={[
92-
{label: 'YAML', value: 'yaml'},
93-
{label: 'Classic Editor', value: 'classic'}
94-
]}>
95-
<TabItem value="yaml">
96-
<p>
97-
In the simple YAML example below we are definiing the task a step in the pipeilne using <code>- task: UnityCMDTask@1</code>. We are also
98-
giving the task a reference name using <code>name: unitycmd</code>, 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 <code>logsOutputPath</code> output variable to the console using <code>echo $(unitycmd.logsOutputPath)</code>. For <code>cmdArgs</code> we specify that Unity should target the <code>standalone</code> platform and execute our custom build script <code>MyBuildTools.BuildProject</code> to perform the build.
99-
</p>
100-
<img src="../static/img/unity-cmd-task/unity-cmd-yaml.png" alt="Classic Pipeline YAML Task Configuration"/>
101-
</TabItem>
102-
<TabItem value="classic">
103-
<p>
104-
The classic (visual) editor for Azure Pipelines provides input fields for configuring the task. In the simple example below, we set <code>Unity editors location</code> 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 <code>Unity project path</code> field empty, since we know our Unity project is in the repository root. For <code>Command line arguments</code> we specify that Unity should target the <code>standalone</code> platform and execute our custom build script <code>MyBuildTools.BuildProject</code> to perform the build. We are also assigning a <code>Reference name</code> 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 <code>logsOutputPath</code> output variable and insert it into any other input field of a task we can then use <code>$(unitycmd.logsOutputPath)</code>.
105-
</p>
106-
107-
<img src="../static/img/unity-cmd-task/unity-cmd-classic.png" alt="Classic Pipeline Designer Task Configuration"/>
108-
</TabItem>
109-
</Tabs>
84+
### YAML
85+
86+
In the simple YAML example below we are definiing the task a step in the pipeilne using `- task: UnityCMDTask@1`. We are also giving the task a reference name using `name: unitycmd`, 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 $(unitycmd.logsOutputPath)`. For `cmdArgs` we specify that Unity should target the `standalone` platform and execute our custom build script `MyBuildTools.BuildProject` to perform the build.
87+
88+
```yaml
89+
trigger:
90+
- main
91+
92+
pool:
93+
name: Unity Windows
94+
95+
steps:
96+
- task: UnityCMDTask@1
97+
name: unitycmd
98+
inputs:
99+
unityEditorsPathMode: unityHub
100+
cmdArgs: -buildTarget standalone -executeMethod MyBuildTools.BuildProject
101+
102+
- script: |
103+
echo $(unitycmd.logsOutputPath)
104+
```
105+
106+
### Classic Pipeline Editor
107+
108+
The classic (visual) editor for Azure Pipelines provides input fields for configuring the task. In the simple example below, we set `Unity editors location` 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. For `Command line arguments` we specify that Unity should target the `standalone` platform and execute our custom build script `MyBuildTools.BuildProject` to perform the build. 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 `$(unitycmd.logsOutputPath)`.
109+
110+
![Classic Pipeline Designer Task Configuration](../static/img/unity-cmd-task/unity-cmd-classic.png)
110111

111112
---
112113

docs/unity-get-project-version-task.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,34 @@ The Unity editor version revision found by the task for the specified Unity proj
4343

4444
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).
4545

46+
### YAML
47+
48+
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)`.
49+
50+
```yaml
51+
trigger:
52+
- main
53+
54+
pool:
55+
name: Unity Windows
56+
57+
steps:
58+
- task: UnityGetProjectVersionTask@1
59+
name: unitygetprojectversion
60+
61+
- script: |
62+
echo $(unitygetprojectversion.projectVersion)
63+
```
64+
65+
### Classic Pipeline Editor
66+
67+
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)`.
68+
69+
![Classic Pipeline Designer Task Configuration](../static/img/unity-get-project-version-task/get-project-version-classic.png)
70+
4671
import Tabs from '@theme/Tabs';
4772
import TabItem from '@theme/TabItem';
4873

49-
<Tabs
50-
lazy
51-
groupId="pipeline-editing-tool"
52-
defaultValue="yaml"
53-
values={[
54-
{label: 'YAML', value: 'yaml'},
55-
{label: 'Classic Editor', value: 'classic'}
56-
]}>
57-
<TabItem value="yaml">
58-
<p>
59-
In the simple YAML example below we are definiing the task a step in the pipeilne using <code>- task: UnityGetProjectVersionTask@1</code>. We are also
60-
giving the task a reference name using <code>name: unitygetprojectversion</code>, 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 <code>projectVersion</code> output variable to the console using <code>echo $(unitygetprojectversion.projectVersion)</code>.
61-
</p>
62-
<img src="../static/img/unity-get-project-version-task/get-project-version-yaml.png" alt="Classic Pipeline YAML Task Configuration"/>
63-
</TabItem>
64-
<TabItem value="classic">
65-
<p>
66-
The classic (visual) editor for Azure Pipelines provides input fields for configuring the task. In the simple example below, we are leaving the <code>Unity project path</code> field empty, since we know our Unity project is in the repository root. We are also assigning a <code>Reference name</code> 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 <code>projectVersion</code> output variable and insert it into any other input field of a task we can then use <code>$(unitygetprojectversion.projectVersion)</code>.
67-
</p>
68-
69-
<img src="../static/img/unity-get-project-version-task/get-project-version-classic.png" alt="Classic Pipeline Designer Task Configuration"/>
70-
</TabItem>
71-
</Tabs>
72-
7374
---
7475

7576
## Log

0 commit comments

Comments
 (0)