Build and Run
A Unity WebGL template is a collection of HTML, CSS, and JavaScript files that surround the WebGL canvas that renders the game. LoL provides a Unity WebGL template that allows a game to communicate with the LoL platform.
Additional Reading: Using WebGL Templates
When building:
  1. 1.
    File -> Build Settings
  2. 2.
    Select WebGL as the platform
  3. 3.
    Open Player Settings for WebGL -> Resolution and Presentation
    • Select the lol-template WebGL template
    • Ensure that the Run in Background checkbox is NOT checked (see Concept->Pause + Resume for more info)
  4. 4.
    If using Unity 2018
    • Open Player Settings for WebGL > Publishing Settings > Linker Target
    • Ensure that Linker Target is set to Both. This will produce a WebAssembly build in addition to the fallback asm.js format for browsers that do not support WebAssembly. (see the Unity User Manual for more information).
    • Note that Unity 2019 no longer supports the asm.js fallback, so there is no longer an option to set the Linker Target.
Last modified 2yr ago
Copy link