Version: 2021.2
Introducing WebGL
WebGL Graphics

WebGL browser compatibility

Unity WebGLA JavaScript API that renders 2D and 3D graphics in a web browser. The Unity WebGL build option allows Unity to publish content as JavaScript programs which use HTML5 technologies and the WebGL rendering API to run Unity content in a web browser. More info
See in Glossary
support for desktop browsers differs depending on the browser. It supports browsers where all of the following are true:

  • The browser is WebGL 1 or WebGL 2 capable. Note: Unity has marked WebGL 1 support for deprecation and will remove it in a future release.
  • The browser is HTML 5 standards-compliant.
  • The browser is 64-bit and supports WebAssembly.

Unity WebGL doesn’t support mobile devices. It might work on high-end devices, but current devices are often not powerful enough and don’t have enough memory to support Unity WebGL content. To make the end user aware of this, the default template for Unity WebGL displays a warning message when the end user attempts to load a Unity WebGL application on a mobile browser. To remove this warning from your application, add your own WebGL template. For information on how to do this, see Add a WebGL template.

Unity WebGL supports some compressed texture formatsA file format for handling textures during real-time rendering by 3D graphics hardware, such as a graphics card or mobile device. More info
See in Glossary
. For information on the compressed texture formats Unity WebGL supports, see Recommended, default, and supported texture compression formats, by platform.

Desktop Browser Desktop Platforms
Google Chrome Windows, macOS, Linux
Mozilla Firefox Windows, macOS, Linux
Apple Safari macOS
Microsoft Edge Windows, macOS, Linux

Notes:

  • Apple Safari doesn’t support WebGL 2 in versions before Safari 15.
  • Apple Safari doesn’t support IndexedDB for content running in an iFrame.
  • Only Mozilla Firefox supports the Large-Allocation HTTP header. For information about the Large-Allocation HTTP header, see Memory in WebGL.
  • Unity WebGL no longer supports Microsoft Edge Legacy. Unity WebGL supports the new Microsoft Edge based on Chromium.

WebGL 1 deprecation

In version 2021.2, Unity marked support for the WebGL 1 Graphics API as deprecated. Currently, there are no changes in behavior and Unity still includes the WebGL 1 Graphics API if you enable the Auto Graphics API Player Setting. However, Unity will remove support for WebGL 1 In a future release.

WebGL 1 graphics card blocklists

GPU blocklists apply. Older graphics cards might not support WebGL. For more information, see:


  • Brotli compression first documented on this page in User Manual 5.6
  • Updated with most recent compatibility information in 2019.1
Introducing WebGL
WebGL Graphics
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961