Skip to content

Commit c65c443

Browse files
authored
Update to Docusaurus v3 (#18)
* Update docusaurus * Reorganize * Clean up and organize, fix missing unity setup docs
1 parent 7ef36d1 commit c65c443

22 files changed

+13084
-13154
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717

1818
npm-debug.log*
1919
yarn-debug.log*
20-
yarn-error.log*
20+
yarn-error.log*

.htaccess

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ifModule mod_rewrite.c>
2+
RewriteEngine On
3+
RewriteBase /
4+
RewriteRule ^index\.html$ - [L]
5+
RewriteCond %{REQUEST_FILENAME} !-f
6+
RewriteCond %{REQUEST_FILENAME} !-d
7+
RewriteRule . /index.html [L]
8+
</ifModule>

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018-2025 Dinomite
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

docs/unity-setup-task.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
id: unity-setup-task
3+
title: Unity Setup
4+
---
5+
6+
## About
7+
8+
Use the Unity Setup task to install a Unity editor version on the build agent. This is especially useful when working with hosted agents,
9+
where you do not know whether the Unity version your project needs to build is installed on the agent.
10+
11+
---
12+
13+
## Inputs
14+
15+
This task supports input variables for configuration.
16+
17+
### unityEditorsPathMode
18+
19+
For the task to run successfully it needs to know where Unity installations are located at on the agent. This input lets you configure,
20+
where the task should look for installations.
21+
22+
**Required**: Yes
23+
24+
**Default Value**: unityHub
25+
26+
#### Options:
27+
28+
| Value | Description |
29+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
30+
| unityHub | Uses the Unity Hub default installation path. |
31+
| environmentVariable | Expects an environment variable `UNITYHUB_EDITORS_FOLDER_LOCATION` to exist on the agent and specifying where to find editor installations. |
32+
| specify | Let's you specify a custom path where to lookup editor installations using the input `customUnityEditorsPath`. |
33+
34+
### customUnityEditorsPath
35+
36+
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.
37+
Make sure to set `unityEditorsPathMode` to `specify` for this input to take effect.
38+
39+
**Required**: Yes, if `unityEditorsPathMode` set to `specify`
40+
41+
**Default Value**: -
42+
43+
### unityProjectPath
44+
45+
Enter the directory path to the Unity project. If no value is entered, the project is assumed to be in the repository root.
46+
47+
**Required**: No
48+
49+
**Default Value**: -
50+
51+
### cmdArgs
52+
53+
Specify command line arguments to pass to the Unity process when running the task.
54+
55+
:::warning
56+
57+
The task will set `-batchmode`, `-projectPath` and `-logfile` for you and you shouldn't specify them in your custom command line arguments. These three arguments are currently required to be always set for the task to work as designed.
58+
59+
:::
60+
61+
**Required**: Yes
62+
63+
**Default Value**: -
64+
65+
#### Options:
66+
67+
Check the official [Unity command line documentation](https://docs.unity3d.com/Manual/CommandLineArguments.html) for options.
68+
69+
---
70+
71+
## Outputs
72+
73+
This task provides output variables.
74+
75+
### logsOutputPath
76+
77+
Path to the Unity editor log files generated while executing the task. Use this e.g. to upload logs in case of a failure.
78+
79+
---
80+
81+
## How to use
82+
83+
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).
84+
85+
### YAML
86+
87+
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.
88+
89+
```yaml
90+
trigger:
91+
- main
92+
93+
pool:
94+
name: Unity Windows
95+
96+
steps:
97+
- task: UnityCMDTask@1
98+
name: unitycmd
99+
inputs:
100+
unityEditorsPathMode: unityHub
101+
cmdArgs: -buildTarget standalone -executeMethod MyBuildTools.BuildProject
102+
103+
- script: |
104+
echo $(unitycmd.logsOutputPath)
105+
```
106+
107+
### Classic Pipeline Editor
108+
109+
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)`.
110+
111+
![Classic Pipeline Designer Task Configuration](../static/img/unity-cmd-task/unity-cmd-classic.png)
112+
113+
---
114+
115+
## Log
116+
117+
When run and successful the task will provide log output similar to this:
118+
119+
![Task Log](../static/img/unity-cmd-task/unity-cmd-log.png)

docusaurus.config.js

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)