How can i use CodePipeline to build Unity3D application in WebGL format

0

I have created AWS codepipeline for building unity application and also specified buildspec.yml for the same. But facing issue while executing unity commands. Below command I am using.

CMD: xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' /opt/unity/Editor/Unity -quit -batchmode -projectPath . -executeMethod WebGLBuilder.build '${BUILD_OUTPUT_FOLDER}/${BUILD_OUTPUT_NAME} -logfile /dev/stdout'

Error: COMMAND_EXECUTION_ERROR: Error while executing command: eval ${UNITY_COMMAND} -projectPath . -executeMethod WebGLBuilder.build '${BUILD_OUTPUT_FOLDER}/${BUILD_OUTPUT_NAME} -logfile /dev/stdout'. Reason: exit status 1

gefragt vor 2 Jahren398 Aufrufe
1 Antwort
0

Your command has single quotes around some parameter '${BUILD_OUTPUT_FOLDER}/${BUILD_OUTPUT_NAME} -logfile /dev/stdout'.

I assume that you use -logfile options to print unity log into standard output, and use ${BUILD_OUTPUT_FOLDER}/${BUILD_OUTPUT_NAME} to specify the build target path. Then you should use double quotes instead of single quotes (only double quotes translate the variable) and use it only around the build target path so that the command to be like following.

xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' /opt/unity/Editor/Unity -quit -batchmode -projectPath . -executeMethod WebGLBuilder.build "${BUILD_OUTPUT_FOLDER}/${BUILD_OUTPUT_NAME}" -logfile /dev/stdout

AWS
beantwortet vor 2 Jahren
  • Hi Junseong_J, Thank you for your inputs. I have tried with double quotes but the same error it is throwing.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen