UnityWebGL LoadingTest
1.3.0

测试Unity的WebGL尺寸和不同版本的加载时间(2018.4-6000.0)和设置


| 版本 | 尺寸 | 关联 |
|---|---|---|
| 6000.0.25F1 | 3.32 MB | https://deml.io/experiments/unity-webgl/6000.0.25f1-webgl2 |
| 2023.2.20f1 | 3.23 MB | https://deml.io/experiments/unity-webgl/2023.2.20f1-webgl2 |
| 2023.1.20f1 | 3.14 MB | https://deml.io/experiments/unity-webgl/2023.1.20f1-webgl2 |
| 2022.3.50f1 | 3.12 MB | https://deml.io/experiments/unity-webgl/2022.3.50f1-webgl2 |
| 2021.3.45f1 | 2.78 MB | https://deml.io/experiments/unity-webgl/2021.3.45f1-webgl2 |
| 2020.3.48f1 | 2.96 MB | https://deml.io/experiments/unity-webgl/2020.3.48f1-webgl2 |
| 版本 | 尺寸 | 关联 |
|---|---|---|
| 6000.0.25F1 | 2.92 MB | https://deml.io/experiments/unity-webgl/6000.0.25f1-minsize-webgl2 |
| 2023.2.20f1 | 2.85 MB | https://deml.io/experiments/unity-webgl/2023.2.20f1-minsize-webgl2 |
| 2023.1.20f1 | 2.72 MB | https://deml.io/experiments/unity-webgl/2023.1.20f1-minsize-webgl2 |
| 2022.3.50f1 | 2.69 MB | https://deml.io/experiments/unity-webgl/2022.3.50f1-minsize-webgl1 |
| 2021.3.45f1 | 2.74 MB | https://deml.io/experiments/unity-webgl/2021.3.45f1-minsize-webgl1 |
| 2020.3.48f1 | 2.48 MB | https://deml.io/experiments/unity-webgl/2020.3.48f1-minsize-webgl1 |
| 版本 | 尺寸 | 关联 |
|---|---|---|
| 6000.0.25F1 | 7.82 MB | https://deml.io/experiments/unity-webgl/6000.0.25f1-urp-webgl2 |
| 2023.2.20f1 | 6.87 MB | https://deml.io/experiments/unity-webgl/2023.2.20f1-urp-webgl2 |
| 2023.1.20f1 | 6.25 MB | https://deml.io/experiments/unity-webgl/2023.1.20f1-urp-webgl2 |
| 2022.3.50f1 | 5.92 MB | https://deml.io/experiments/unity-webgl/2022.3.50f1-urp-webgl2 |
| 2021.3.45f1 | 6.31 MB | https://deml.io/experiments/unity-webgl/2021.3.45f1-urp-webgl2 |
| 2020.3.48f1 | 5.60 MB | https://deml.io/experiments/unity-webgl/2020.3.48f1-urp-webgl2 |
| 版本 | 尺寸 | 关联 |
|---|---|---|
| 6000.0.25F1 | 6.05 MB | https://deml.io/experiments/unity-webgl/6000.0.25f1-urp-minsize-webgl2 |
| 2023.2.20f1 | 5.30 MB | https://deml.io/experiments/unity-webgl/2023.2.20f1-urp-minsize-webgl2 |
| 2023.1.20f1 | 5.71 MB | https://deml.io/experiments/unity-webgl/2023.1.20f1-urp-minsize-webgl2 |
| 2022.3.50f1 | 4.65 MB | https://deml.io/experiments/unity-webgl/2022.3.50f1-urp-minsize-webgl1 |
| 2021.3.45f1 | 6.11 MB | https://deml.io/experiments/unity-webgl/2021.3.45f1-urp-minsize-webgl1 |
| 2020.3.48f1 | 4.86 MB | https://deml.io/experiments/unity-webgl/2020.3.48f1-urp-minsize-webgl1 |
| 平台 | 铬合金 | Firefox | 边缘 | 野生动物园 | Internet Explorer |
|---|---|---|---|---|---|
| Windows 10 | ✔️ | ✔️ | ✔️ | ➖ | |
| Linux | ✔️ | ✔️ | ✔️ | ➖ | ➖ |
| 苹果 | ✔️ | ✔️ | ✔️ | ✔️ | ➖ |
| 安卓 | ✔️ | ✔️ | ✔️ | ➖ | ➖ |
| ios | ✔️ | ✔️ | ✔️ | ✔️ | ➖ |
| Android智能电视 | ✔️ | ➖ | ➖ | ➖ | ➖ |
✔️ :支持|
An error occurred running the Unity content on this page. See you browser JavaScript console for more info. The error: Script error. - 使用iOS 16.2和Firefox 108,我再也无法在2019年再现此问题了。 Unable to parse Build/WEBGL.framework.js.br! This can happen if build compression was enabled but web server hosting the content was misconfigured to not serve the file with HTTP Response Header "Content-Encoding: br" present. Check browser Console and Devtools Network tab to debug.

Shader error in 'Hidden/Universal/CoreBlit': invalid subscript 'positionCS' at
UnityWebGL-LoadingTest/Library/PackageCache/[email protected]/Runtime/Utilities/Blit.hlsl(92) (on gles)
Compiling Vertex program with DISABLE_TEXTURE2D_X_ARRAY
Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_LIGHTMAP_RGBM_ENCODING UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: BLIT_SINGLE_SLICE SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING
Shader error in 'Hidden/kMotion/CameraMotionVectors': SV_VertexID semantic is not supported on GLES 2.0 at line 11 (on gles)
Compiling Subshader: 0, Pass: , Vertex program with <no keywords>
Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_LIGHTMAP_RGBM_ENCODING UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING
Texture creation failed. 'ShadowAuto' is not supported for Render usage on this platform. Use 'SystemInfo.IsFormatSupported' C# API to check format support.
NullReferenceException: Object reference not set to an instance of an object.
Tools/Build WebGL/minsize构建SizeNoneMaster 此功能添加了2021-11-21,仅由当天开始的版本支持
脚本WebGlBridge添加了一个易于访问的游戏对象,可以通过unityGame.SendMessage("WebGL", "COMMAND_NAME",PARAMETER)
当前,以下命令可用:
runUnityCommand ( "AllocateByteArrayMemory" , int mb ) ; - > Allocate memory to test memory usage and limits
runUnityCommand ( "CheckOnlineStatus" ) ; - > Check if browser is online
runUnityCommand ( "CopyToClipboard" , "string text" ) ; - > Copy text to clipboard
runUnityCommand ( "DeleteAllPlayerPrefs" ) ; - > PlayerPrefs . DeleteAll
runUnityCommand ( "DisableCaptureAllKeyboardInput" ) ; - > Disable unity from consuming all keyboard input
runUnityCommand ( "EnableCaptureAllKeyboardInput" ) ; - > Enable unity from consuming all keyboard input
runUnityCommand ( "LogExampleMessages" ) ; - > Log example messages for Log , warning and error
runUnityCommand ( "LogMemory" ) ; - > Logs the current memory
runUnityCommand ( "LogMessage" , "string message" ) ; - > Log a custom message
runUnityCommand ( "LogShaderCompilation" , int enabled ) ; - > GraphicsSettings . logWhenShaderIsCompiled
runUnityCommand ( "LogTextureSupport" ) ; - > Log supported and unsupported texture formats
runUnityCommand ( "LogUserAgent" ) ; - > Log User Agent and isMobileDevice
runUnityCommand ( "ReleaseByteArrayMemory" ) ; - > Release all allocated byte array memory
runUnityCommand ( "SaveScreenshot" ) ; - > Save current screen as PNG
runUnityCommand ( "SaveScreenshotSuperSize" , int superSize ) ; - > Save current screen as PNG with variable super size
runUnityCommand ( "SetApplicationRunInBackground" , int runInBackground ) ; - > Application . runInBackground
runUnityCommand ( "SetApplicationTargetFrameRate" , int targetFrameRate ) ; - > Application . targetFrameRate
runUnityCommand ( "SetTimeFixedDeltaTime" , float fixedDeltaTime ) ; - > Time . fixedDeltaTime
runUnityCommand ( "SetTimeTimeScale" , float timeScale ) ; - > Time . timeScale
runUnityCommand ( "ThrowDictionaryException" ) ; - > Throw a dictionary key not found exception
runUnityCommand ( "ToggleInfoPanel" ) ; - > Toggle develop ui visibility of InfoPanel
runUnityCommand ( "TriggerGarbageCollection" ) ; - > Trigger garbage collection
runUnityCommand ( "UnloadUnusedAssets" ) ; - > Resources . UnloadUnusedAssets runUnityCommand ( "AddSpawner" ) ; - > Add a spawner
runUnityCommand ( "PauseSpawning" ) ; - > Pause spawning of cubes
runUnityCommand ( "RemoveSpawner" ) ; - > Remove a spawner
runUnityCommand ( "ResumeSpawning" ) ; - > Resume spawning of cubes runUnityCommand ( "Help" ) ; - > Log all available commands 该存储库支持通过game.ci的连续集成。有用于创建Unity许可证,构建项目并升级项目的脚本。
主要的github动作工作流程是释放。在Unity方面,使用game.ci的buildScript:buildScript.cs。该脚本通过以下语法来支持通过git标签定义不同的构建逻辑: UNITY_VERSION TAG1 TAG2 ...示例: 2022.2.0f1-urp-webgl2
支持以下标签:
minsize :将代码优化设置为大小,并且不支持异常debug :构建具有嵌入式调试符号和完整堆栈跟踪的开发构建webgl1 :为WebGL1构建webgl2 :为WebGL2构建用于升级Unity升级 - 不使用。它可以通过定义分支升级和一些其他设置来手动通过github操作触发
它将使用新定义的Unity版本以及标签创建一个拉动请求,以触发自动构建。此外,所有软件包均已更新到其最新版本,另请参见UnityPackagesScripts.cs。
您可以在此处找到所有现场构建的清单,它们的大小在这里:https://deml.io/experiments/unity-webgl/