我已经实现将其编译为Windows或Mac,但是使用WebGL却没有运气。
看我的台词
从Windows到Windows(将它们放在.bat文件中)
set mypath=%cd%
@echo %mypath%
"C:\Program Files\Unity\Editor\Unity.exe" -quit -batchmode -logFile stdout.log -projectPath %mypath% -buildWindowsPlayer "builds\mygame.exe"
Run Code Online (Sandbox Code Playgroud)
从Linux到Windows(将它们放在.sh文件中)
#/bin/bash
projectPath=`pwd`
xvfb-run --auto-servernum --server-args='-screen 0 1024x768x24:32' /opt/Unity/Editor/Unity -batchmode -nographics -logfile stdout.log -force-opengl -quit -projectPath ${projectPath} -buildWindowsPlayer "builds/mygame.exe"
Run Code Online (Sandbox Code Playgroud)
从Windows或Linux到Mac:更换-buildWindowsPlayer与-buildOSXPlayer和mygame.exe与mygame.app
但是,我遇到了WebGL的麻烦。Unity3D的文档:https ://docs.unity3d.com/Manual/CommandLineArguments.html 没有提供任何帮助
有命令参数
-buildTarget webgl,
但是没有任何反应。
HEEEEEEEELLLLLLLLLLLLLPPPPPPP !!!! :(