1
我已经实现将它编译到Windows或Mac中,但没有使用WebGL。如何从命令行编译Unity3D游戏项目到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"
从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"
从Windows或Linux到Mac:替换-buildWindowsPlayer与-buildOSXPlayer和mygame.exe与mygame.app
但是,我有WebGL的麻烦。 Unity3D的文档:https://docs.unity3d.com/Manual/CommandLineArguments.html 不提供任何帮助
有命令参数 -buildTarget WebGL的
但没有与这种情况发生。
HEEEEEEEELLLLLLLLLLLLLPPPPPPP !!!! :(
为了监控Unity.exe过程,你可以在PHP中使用:对于Windows服务器:下面的PHP命令生成CSV格式的报告,其统一进程在服务器上运行。 $ processUnityCSV = exec('TASKLIST/FI“imagename eq Unity.exe”/ v/fo CSV'); – jimver04