teamcity-unity-plugin
teamcity-unity-plugin copied to clipboard
Option to remove -quit command
-quit is added automatically as a parameter but that is an issue when executed method wait for editor update to finish execution.
We need an option to remove "-quit" and let the method call EditorApplication.Exit(0) manually.
Yes please. I want to run some tests and this prevents us from completing execution. Trying to catch EditorApplication.wantsToQuit doesn't work in batchmode
Figured out reading the code that if you check run tests option it won't add -quit to the command line arguments. I guess that's a good hack for now. Thanks in advance.
Getting this option would be great, but the "run tests" workaround is OK for now.
We needed a version of the plugin without the -quit options. This is why we made a custom build.
This are the changes we made:
teamcity-unity-plugin\plugin-unity-agent\src\main\kotlin\jetbrains\buildServer\unity\UnityRunnerBuildService.kt
In the method buildStarted
val arguments = mutableListOf("-quit", "-batchmode", "-nographics")
to
val arguments = mutableListOf("-batchmode", "-nographics")
Would also appreciate this enhancement. We are attempting to run a light bake build command using the Bakery plugin. This plugin provides a handy batch bake script for this purpose, however it uses the editor update delegate to perform it's work, so we cannot have the -quit arg active or else this work is skipped.
I am able to prevent the -quit arg from being appended by enabling tests and calling EditorApplication.Exit(0) manually. However, I'm now invoking nunit code paths because it thinks there are tests to run and it feels hacky.
We would love this option too! We want to run a coroutine with executeMethod, however there is no way to do this currently as Unity quits immediately because of -quit.
This issue currently actually blocks us from running certain workflows through the unity runner, basically having to revert back to direct invocation of the unity editor, which makes configuration of the whole CI pipeline a bit of a mess because we have to mix how we invoke the editor executable.
I really need this as well for batch jobs that run async processes such as Lightmapping. Without removing the -quit
argument, this is impossible to do. Ideally this is a checkbox that is enabled by default.