Skip to content

Commit ac44041

Browse files
committed
Update readme
1 parent 35e2981 commit ac44041

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Preview](./preview.png)
44

5-
[![](https://img.shields.io/github/release-date/JohannesDeml/UnityWebGL-LoadingTest.svg)](https://github.com/JohannesDeml/UnityWebGL-LoadingTest/releases) [![Tested up to Unity 2022.1](https://img.shields.io/badge/tested%20up%20to%20unity-2022.1-green.svg?logo=unity&cacheSeconds=2592000)](https://unity3d.com/get-unity/download/archive)
5+
[![](https://img.shields.io/github/release-date/JohannesDeml/UnityWebGL-LoadingTest.svg)](https://github.com/JohannesDeml/UnityWebGL-LoadingTest/releases) [![Tested up to Unity 2022.2](https://img.shields.io/badge/tested%20up%20to%20unity-2022.2-green.svg?logo=unity&cacheSeconds=2592000)](https://unity3d.com/get-unity/download/archive)
66

77
*Testing Unity's WebGL size and loading time for different versions and platforms*
88
[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
146146

147147
Currently the following commands are available:
148148

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+
```
154162

155163
## Older versions
156164
| Version | Size | Link |

0 commit comments

Comments
 (0)