Skip to content

Commit 0d9b8c5

Browse files
authored
Update commands in readme
1 parent 6d06857 commit 0d9b8c5

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

README.md

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -149,36 +149,47 @@ The script `WebGlBridge` adds an easy to access gameobject that can be called fr
149149

150150
Currently the following commands are available:
151151

152+
### CommonCommands
152153
```javascript
153-
Available commands:
154-
---CommonCommands---
154+
runUnityCommand("AllocateByteArrayMemory", int mb); -> Allocate memory to test memory usage and limits
155+
runUnityCommand("CheckOnlineStatus"); -> Check if browser is online
156+
runUnityCommand("CopyToClipboard", "string text"); -> Copy text to clipboard
157+
runUnityCommand("DeleteAllPlayerPrefs"); -> PlayerPrefs.DeleteAll
155158
runUnityCommand("DisableCaptureAllKeyboardInput"); -> Disable unity from consuming all keyboard input
156159
runUnityCommand("EnableCaptureAllKeyboardInput"); -> Enable unity from consuming all keyboard input
160+
runUnityCommand("LogExampleMessages"); -> Log example messages for Log, warning and error
157161
runUnityCommand("LogMemory"); -> Logs the current memory
158-
runUnityCommand("UnloadUnusedAssets"); -> Resources.UnloadUnusedAssets
159-
runUnityCommand("SetApplicationRunInBackground", System.Int32 runInBackground); -> Application.runInBackground
160-
runUnityCommand("SetApplicationTargetFrameRate", System.Int32 targetFrameRate); -> Application.targetFrameRate
161-
runUnityCommand("SetTimeFixedDeltaTime", System.Single fixedDeltaTime); -> Time.fixedDeltaTime
162-
runUnityCommand("SetTimeTimeScale", System.Single timeScale); -> Time.timeScale
163-
runUnityCommand("ToggleInfoPanel"); -> Toggle develop ui visibility of InfoPanel
162+
runUnityCommand("LogMessage", "string message"); -> Log a custom message
163+
runUnityCommand("LogShaderCompilation", int enabled); -> GraphicsSettings.logWhenShaderIsCompiled
164+
runUnityCommand("LogTextureSupport"); -> Log supported and unsupported texture formats
164165
runUnityCommand("LogUserAgent"); -> Log User Agent and isMobileDevice
165-
runUnityCommand("LogExampleMessages"); -> Log example messages for Log, warning and error
166-
runUnityCommand("LogMessage", "System.String message"); -> Log a custom message
166+
runUnityCommand("ReleaseByteArrayMemory"); -> Release all allocated byte array memory
167+
runUnityCommand("SaveScreenshot"); -> Save current screen as PNG
168+
runUnityCommand("SaveScreenshotSuperSize", int superSize); -> Save current screen as PNG with variable super size
169+
runUnityCommand("SetApplicationRunInBackground", int runInBackground); -> Application.runInBackground
170+
runUnityCommand("SetApplicationTargetFrameRate", int targetFrameRate); -> Application.targetFrameRate
171+
runUnityCommand("SetTimeFixedDeltaTime", float fixedDeltaTime); -> Time.fixedDeltaTime
172+
runUnityCommand("SetTimeTimeScale", float timeScale); -> Time.timeScale
167173
runUnityCommand("ThrowDictionaryException"); -> Throw a dictionary key not found exception
168-
runUnityCommand("LogTextureSupport"); -> Log supported and unsupported texture formats
169-
runUnityCommand("DeleteAllPlayerPrefs"); -> PlayerPrefs.DeleteAll
170-
runUnityCommand("LogShaderCompilation", System.Int32 enabled); -> GraphicsSettings.logWhenShaderIsCompiled
174+
runUnityCommand("ToggleInfoPanel"); -> Toggle develop ui visibility of InfoPanel
175+
runUnityCommand("TriggerGarbageCollection"); -> Trigger garbage collection
176+
runUnityCommand("UnloadUnusedAssets"); -> Resources.UnloadUnusedAssets
177+
```
171178

172-
---ObjectSpawnerCommands---
173-
runUnityCommand("PauseSpawning"); -> Pause spawning of cubes
174-
runUnityCommand("ResumeSpawning"); -> Resume spawning of cubes
179+
### ObjectSpawnerCommands
180+
```javascript
175181
runUnityCommand("AddSpawner"); -> Add a spawner
182+
runUnityCommand("PauseSpawning"); -> Pause spawning of cubes
176183
runUnityCommand("RemoveSpawner"); -> Remove a spawner
184+
runUnityCommand("ResumeSpawning"); -> Resume spawning of cubes
185+
```
177186

178-
---WebBridge---
187+
### WebBridge
188+
```javascript
179189
runUnityCommand("Help"); -> Log all available commands
180190
```
181191

192+
182193
## Github Build Actions
183194

184195
This repository supports continuous Integration through [game.ci](https://game.ci/). There are scripts for creating a unity license, building the project and upgrading the project.

0 commit comments

Comments
 (0)