- Home /
Unity 2019.2.2f1 Commandline not generate build files - folder is empty
I will try to use CircleCI as the build server. Image: gableroux/unity3d:2019.2.2f1
.
Command to make game:
/opt/Unity/Editor/Unity \
-projectPath ./Zilon.Client \
-buildWindows64Player ./ClientBuild/LAST.exe \
-batchmode \
-logFile ./ClientBuild/build.log \
-nographics \
-quit
In result there are no any build files.
I tried empty project.
/opt/Unity/Editor/Unity \
-projectPath "./Empty/New Unity Project" \
-buildWindows64Player ./ClientBuild/Empty.exe \
-batchmode \
-logFile ./ClientBuild/build.log \
-nographics \
-quit
This have same result - empty build folder. Exit code 0. Logs ends with
Exiting batchmode successfully now!
I tried to build the project through the command line on the local machine, and it successfully generates build files (Windows 10).
My config.yml
:
https://github.com/kreghek/Zilon_Roguelike/blob/feature-circle-ci/.circleci/config.yml.
And CircleCi Log:
https://circleci.com/gh/kreghek/Zilon_Roguelike/210
Similar question https://gitlab.com/gableroux/unity3d/issues/49
What could be the problem? What am I doing wrong? Has anyone come across anything like this?
Answer by kreghek · Sep 17, 2019 at 08:33 AM
I checked the assembly of an empty project for gableroux/unity3d:2018.4.8f1. As a result, there is also an empty assembly folder.
https://circleci.com/gh/kreghek/Zilon_Roguelike/213
It looks like the commandline is being used incorrectly. Or something like that.
Here is the script I'm using
BUILD_PATH=./ClientBuild
mkdir -p $BUILD_PATH
/opt/Unity/Editor/Unity \
-projectPath "./Empty/New Unity Project" \
-buildWindows64Player $BUILD_PATH/LAST.exe \
-batchmode \
-logFile /dev/stdout \
-nographics \
-quit
UNITY_EXIT_CODE=$?
if [ $UNITY_EXIT_CODE -eq 0 ]; then
echo "Run succeeded, no failures occurred";
elif [ $UNITY_EXIT_CODE -eq 2 ]; then
echo "Run succeeded, some tests failed";
elif [ $UNITY_EXIT_CODE -eq 3 ]; then
echo "Run failure (other failure)";
else
echo "Unexpected exit code $UNITY_EXIT_CODE";
fi
ls -la $BUILD_PATH
[ -n "$(ls -A $BUILD_PATH)" ] # fail job if build folder is empty