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

質問済み 2年前398ビュー
1回答
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
回答済み 2年前
  • Hi Junseong_J, Thank you for your inputs. I have tried with double quotes but the same error it is throwing.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン