|
|
@@ -1,57 +0,0 @@
|
|
|
-@echo off
|
|
|
-:: =============================================
|
|
|
-:: Unity WebGL Build Script
|
|
|
-:: For Unity 2020.3.33f1c2
|
|
|
-:: =============================================
|
|
|
-
|
|
|
-:: Configuration (Edit these paths)
|
|
|
-set UNITY_PATH=E:\ruanJian\2020.3.33f1c2\Editor\Unity.exe
|
|
|
-set PROJECT_PATH=D:\gfgProject\gfg_dev\0A-GFGClient\5client_webgl\GameClient
|
|
|
-set BUILD_PATH=Build\WebGL
|
|
|
-set LOG_FILE=build_log.txt
|
|
|
-
|
|
|
-:: Clear old log
|
|
|
-if exist "%LOG_FILE%" del "%LOG_FILE%"
|
|
|
-
|
|
|
-:: Verify Unity path
|
|
|
-if not exist "%UNITY_PATH%" (
|
|
|
- echo [ERROR] Unity executable not found at: %UNITY_PATH%
|
|
|
- pause
|
|
|
- exit /b 1
|
|
|
-)
|
|
|
-
|
|
|
-:: Verify project path
|
|
|
-if not exist "%PROJECT_PATH%\Assets" (
|
|
|
- echo [ERROR] Invalid project path: %PROJECT_PATH%
|
|
|
- pause
|
|
|
- exit /b 1
|
|
|
-)
|
|
|
-
|
|
|
-:: Start build process
|
|
|
-echo Starting Unity WebGL build...
|
|
|
-echo Project Path: %PROJECT_PATH%
|
|
|
-echo Output Directory: %BUILD_PATH%
|
|
|
-echo Log File: %LOG_FILE%
|
|
|
-echo.
|
|
|
-
|
|
|
-"%UNITY_PATH%" ^
|
|
|
- -projectPath "%PROJECT_PATH%" ^
|
|
|
- -buildTarget WebGL ^
|
|
|
- -webgl-incremental-build 1 ^
|
|
|
- -executeMethod WebGLBuilder.Build ^
|
|
|
- -logFile "%LOG_FILE%" ^
|
|
|
- -quit
|
|
|
-
|
|
|
-:: Check build result
|
|
|
-if %errorlevel% equ 0 (
|
|
|
- echo.
|
|
|
- echo [SUCCESS] WebGL build completed!
|
|
|
- echo Output Directory: %PROJECT_PATH%\%BUILD_PATH%
|
|
|
-) else (
|
|
|
- echo.
|
|
|
- echo [ERROR] Build failed! Check log: %LOG_FILE%
|
|
|
-)
|
|
|
-
|
|
|
-:: Open log file
|
|
|
-notepad "%LOG_FILE%"
|
|
|
-pause
|