Pause + Resume

Student game play may be interrupted by the teacher so she can provide instructions or help the class with the material. When this happens, your game will receive a message asking it to pause and the platform will display a splash screen. When the teacher resumes play, your game will receive a resume message and the LoL splash screen will disappear after ensuring that the student is ready to resume game play.


Set Application.runInBackground = false

Unity's behavior in WebGL is to auto-pause the game based on DOM focus. There is no need to handle the GameStateChanged event or implement pausing directly when using Unity. When testing your game inside of the Unity IDE, clicking outside of the IDE causes the game to lose focus, just like the pause implemented by the LoL platform.

TIME: Any count down timers or time based animations should use Time.deltaTime inside your Update callback. Avoid any use of System.DateTime (aka wall time)

Additional Reading: WebGL Performance, Application.runInBackground


Subscribe to the GameStateChanged event which sends Pause or Resume. See Javascript API.

Last updated