Currently I have build pipeline made with gitlab and when i run build job on windows machine I get following strange behaviour. My job is running powershell script to create any missing folder for build, then i run unity editor in batch mode. But for some reason, Unity decides to change working directory to root folder of gitlab runner and there, he creates project related files. So far I spend entire day to find issue, but i didn’t find any clue…
Try using double instead of single quotes around the project path.
Little late to give final solution for the problem. Better late than never
So in short I had to reorder argument list in powershell script to fix this strange issue.
Here is before
$ArgumentList = @"
-projectpath "Unity_Project_Path"
-quit
-batchmode
-nographics
-buildTarget
StandaloneWindows64
-customBuildName
PipelineTest
-customBuildPath
"Build_Path"
"@
Here is after
$ArgumentList = @"
-projectpath
"Unity_Project_Path"
-quit
-batchmode
-nographics
-buildTarget
StandaloneWindows64
-customBuildName
PipelineTest
-customBuildPath
"Build_Path"
"@