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

feita há 2 anos398 visualizações
1 Resposta
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
respondido há 2 anos
  • Hi Junseong_J, Thank you for your inputs. I have tried with double quotes but the same error it is throwing.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas