|
2 | 2 |
|
3 | 3 |  |
4 | 4 |
|
5 | | -[](https://github.com/JohannesDeml/UnityWebGL-LoadingTest/releases) [](https://unity3d.com/get-unity/download/archive) |
| 5 | +[](https://github.com/JohannesDeml/UnityWebGL-LoadingTest/releases) [](https://unity3d.com/get-unity/download/archive) |
6 | 6 |
|
7 | 7 | *Testing Unity's WebGL size and loading time for different versions and platforms* |
8 | 8 | [Unity Forum Thread](https://forum.unity.com/threads/webgl-builds-for-mobile.545877/). |
@@ -146,11 +146,19 @@ The script `WebGlBridge` adds an easy to access gameobject that can be called fr |
146 | 146 |
|
147 | 147 | Currently the following commands are available: |
148 | 148 |
|
149 | | -* `LogMemory()` : logs the current memory consumption |
150 | | -* `SetApplicationRunInBackground(int runInBackground)` : [Application.runInBackground](https://docs.unity3d.com/ScriptReference/Application-runInBackground.html) |
151 | | -* `SetApplicationTargetFrameRate(int targetFrameRate)` : [Application.targetFrameRate](https://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html) |
152 | | -* `SetTimeFixedDeltaTime(float fixedDeltaTime)` : [Time.fixedDeltaTime](https://docs.unity3d.com/ScriptReference/Time-fixedDeltaTime.html) |
153 | | -* `SetTimeTimeScale(float timeScale)` : [Time.timeScale](https://docs.unity3d.com/ScriptReference/Time-timeScale.html) |
| 149 | +```javascript |
| 150 | +unityGame.SendMessage("WebGL", "DisableCaptureAllKeyboardInput"); -> Disable unity from consuming all keyboard input |
| 151 | +unityGame.SendMessage("WebGL", "EnableCaptureAllKeyboardInput"); -> Enable unity from consuming all keyboard input |
| 152 | +unityGame.SendMessage("WebGL", "LogMemory"); -> Logs the current memory |
| 153 | +unityGame.SendMessage("WebGL", "SetApplicationRunInBackground", System.Int32 runInBackground); -> Application.runInBackground |
| 154 | +unityGame.SendMessage("WebGL", "SetApplicationTargetFrameRate", System.Int32 targetFrameRate); -> Application.targetFrameRate |
| 155 | +unityGame.SendMessage("WebGL", "SetTimeFixedDeltaTime", System.Single fixedDeltaTime); -> Time.fixedDeltaTime |
| 156 | +unityGame.SendMessage("WebGL", "SetTimeTimeScale", System.Single timeScale); -> Time.timeScale |
| 157 | +unityGame.SendMessage("WebGL", "ToggleInfoPanel"); -> Toggle develop ui visibility of InfoPanel |
| 158 | +unityGame.SendMessage("WebGL", "LogExampleMessage"); -> Log an example debug message |
| 159 | +unityGame.SendMessage("WebGL", "LogMessage", "System.String message"); -> Log a custom message |
| 160 | +unityGame.SendMessage("WebGL", "Help"); -> Log all available commands |
| 161 | +``` |
154 | 162 |
|
155 | 163 | ## Older versions |
156 | 164 | | Version | Size | Link | |
|
0 commit comments