TeamCity plugin supports building Unity projects
APACHE-2.0 License
[
The plugin supports building Unity projects on TeamCity.
This TeamCity build feature allows to automatically activate and return Unity Editor license before build start and after build completion.
Additionally, it allows you to configure the address for the assets caching proxy, which can be either the Cache server or the Unity accelerator. The appropriate arguments will be used based on the asset pipeline version used in the project.
You can download the plugin and install it as an additional TeamCity plugin.
Note: After installation, you need to restart TeamCity server by going to Administration => Diagnostics => Restart Server
The plugin is compatible with:
TeamCity 2022.10 and above.
Currently, it still supports all the Java versions that TeamCity supports, though it will be moved to Java 11 in the future. Please consider upgrading the Java version your TeamCity instance is running on.
Unity 2017 and above.
The plugin automatically detects Editors installed via Unity Hub. Also it searches Editors in the PATH
environment variable and in the following well-known directories:
/Applications/Unity*
and /Applications/Unity/Hub/Editor/*
/opt/Unity*
/~/Unity*
and /opt/Unity/Hub/Editor/*
/~/Unity/Hub/Editor/*
%Program Files%/Unity*
and %Program Files%/Unity/Hub/Editor/*
Note: you need to start TeamCity build agent under the same user account which is used for Unity Hub installation.
To add Unity installation located in custom path you could use UNITY_HOME
environment variable, e.g. UNITY_HOME=C:\Tools\Unity_2018.1\
. Multiple paths could be specified by using default path delimiter.
To search Unity installation directories in custom path matching Unity*
pattern you could use UNITY_HINT_PATH
environment variable, e.g. UNITY_HINT_PATH=C:\Tools
. Multiple paths could be specified by using default path delimiter.
You may also install Unity as a TeamCity agent tool. See TeamCity Agent Tool Configuration for more information.
All detected Unity versions will be reported as build agent configuration parameters with the unity.path.%unityVersion%
prefix. They could be found on the Agents -> "%agentName%" -> Agent Parameters -> Configuration Parameters page in TeamCity server UI.
The runner allows overriding default error logging settings by using "Line statuses file" parameter where you could specify the path to configuration file. Example file contents:
<?xml version="1.0" encoding="UTF-8"?>
<lines>
<line level="warning" message="warning CS\d+" />
<line level="error" message="error CS\d+" />
</lines>
This plugin supports optionally installing Unity as a TeamCity agent tool.
To create a tool zip file for Unity, do the following:
Editor
folder + plugin descriptor into an archive named Unity-<version>.zip
such as Unity-2018.4.9f1.zip
📁 Unity-2018.4.9f1.zip
|- 📄 teamcity-plugin.xml
|- 📂 Editor
│ |- 📂 BugReporter
│ |- 📂 Data
│ |- 📂 locales
│ |- 📄 Unity.exe
│ |- ...
Note that the archive structure may vary depending on the distributed binaries.Unity.app
.This plugin is integrated with Container Wrapper extension.
The integration works only with 2023.09
and above versions of TeamCity.
This problem indicates that the Unity Editor installation was not found on any of build agent machines. Check that you have installed Editor on your build agents and machines were properly configured.
We place a high value on user feedback and encourage you to share your experience and suggestions. Send a Pull Request to contribute or contact us via YouTrack to report an issue.
git config --local core.hooksPath .githooks
./gradlew build