|
14 | 14 | * GPU Instancing for materials
|
15 | 15 | * Shadows
|
16 | 16 | * Brotli Compression
|
17 |
| -* Togglable In-DOM Debug console ([Example](https://deml.io/experiments/unity-webgl/2021.1.4f1/)) |
| 17 | +* Togglable In-DOM Debug console ([Demo](https://deml.io/experiments/unity-webgl/2021.1.4f1/)) |
| 18 | +* Easy access to unity functions through the browser console ([Demo](https://deml.io/experiments/unity-webgl/2020.3.23f1/)|[Youtube](https://youtu.be/OjypxsD6XMI)) |
18 | 19 | * Handy debug functions for times and memory consumption
|
19 | 20 | * Responsive template layout for maximum mobile compatibility
|
20 | 21 | * Works with [Unity WebGL Publisher](https://play.unity.com/discover/all-showcases) (Use [2020.3-lts](https://github.com/JohannesDeml/UnityWebGL-LoadingTest/tree/2020-lts) or [2020.3-lts-urp](https://github.com/JohannesDeml/UnityWebGL-LoadingTest/tree/2020-lts-urp) branch)
|
@@ -93,6 +94,20 @@ Version | Size | Link
|
93 | 94 | * Enable Exceptions: `None`
|
94 | 95 | * C++ Compiler Configuration: `Master`
|
95 | 96 |
|
| 97 | +## Browser Console commands |
| 98 | +
|
| 99 | +*This functionality was added 2021-11-21 and is only supported by releases starting at that date* |
| 100 | +
|
| 101 | +The script `WebGlBridge` adds an easy to access gameobject that can be called from the browser console through `unityGame.SendMessage("WebGL", "COMMAND_NAME",PARAMETER)` |
| 102 | +
|
| 103 | +Currently the following commands are available: |
| 104 | +
|
| 105 | +* `LogMemory()` : logs the current memory consumption |
| 106 | +* `SetApplicationRunInBackground(int runInBackground)` : [Application.runInBackground](https://docs.unity3d.com/ScriptReference/Application-runInBackground.html) |
| 107 | +* `SetApplicationTargetFrameRate(int targetFrameRate)` : [Application.targetFrameRate](https://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html) |
| 108 | +* `SetTimeFixedDeltaTime(float fixedDeltaTime)` : [Time.fixedDeltaTime](https://docs.unity3d.com/ScriptReference/Time-fixedDeltaTime.html) |
| 109 | +* `SetTimeTimeScale(float timeScale)` : [Time.timeScale](https://docs.unity3d.com/ScriptReference/Time-timeScale.html) |
| 110 | +
|
96 | 111 | ## Older versions
|
97 | 112 | | Version | Size | Link |
|
98 | 113 | | ---------- | ------- | --------------------------------------------------- |
|
|
0 commit comments