◆Getting Started

●Support Status

 As of January 2025, WebGL is a beta function.  While the function generally works, it is still undergoing testing. Please use the Web GL function with caution.

 

●Additional Considerations

WebGL performance can be highly variable depending on the platform used.

More improvements to performance are being worked on, but at this time please be aware of the following:

  • Playback and distribution methods for WebGL games is dependent on browser technology. Some awareness of different browsers is strongly recommended.
  • Due to the need to load the game data into the browser, this can cause stability issues for larger games.
  • On some environments, sound may be disabled by default.
  • There may be differences depending on the hardware platform, even for the same browser. This includes Windows and MacOS as well as the different mobile platforms and form factors.
  • Some Addons may not function on some platforms.

◆Creating A WebGL Build

●Adding the Web GL Build Package

 In order to create Web GL builds, the appropriate build package must be added via the Unity Hub.  Open Unity Hub and switch to the Installs tab.  Browse to the appropriate installation of the Unity Editor, click the gear mark to open a dropdown menu, and then select "Add modules".

Unity_Hub_Add_Module1_1_1bb293fee8

A list of available Modules will be displayed. scroll to the "WebGL Build Support" module and select it using the provided checkbox. Confirm that it is properly selected and that no other modules are selected then select "Continue".

Unity_Hub_Add_Module2_1_9f37d17b7f

The module will then be installed, so please wait until it completes.

Unity_Hub_Add_Module3_1_9a862265a7

 

●Check Before Creating A Build

Before creating a build, it is required that the WebGL settings be confirmed. A failure to do so is highly likely to result in build failure.

  1. Select "Project Settings" from the "Edit" menu.
  2. Browse to the indicated WebGL (#1 in the image below) settings tab.
  3. Disable "Auto Graphics API" by unchecking it (#2).
  4. Select "WebGL 1 (Deprecated)" (#3) .
  5. Click the  "ー" button (#4) to delete WebGL 1.
  6. This could still cause issues when building, so it is recommended that rebooting UNITE be performed in order to ensure the settings take effect.

After this has been completed, the process of creating a build should be the same as for other build targets.

blobid0_4_195127d1ed

 

●Playing A WebGL Build

 As with other build types, simply use the "Create Build" button.

Web_GL_Build_Button_1_b08d10fad4

The Build Settings window will appear. Select WebGL from the Platform list and then click Build And Run. A build will automatically be generated, followed by your browser opening the game in a tab.

Web_GL_Build_Button2_1_8cf75c1722

 

●Runtime Considerations

 Depending on local environment settings, selecting "Build" may require the user to prepare their own web server.  Selecting "Build And Run" causes Unity to generate a temporary and simple web server for the duration of the test. We strongly recommend this for most cases due to the ease of use it provides.