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

demandé il y a 2 ans398 vues
1 réponse
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
répondu il y a 2 ans
  • Hi Junseong_J, Thank you for your inputs. I have tried with double quotes but the same error it is throwing.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions