get in touch

Technology Trends · Services

Unity on the web in 2026: WebGPU is ready, but build for WebGL 2 first

Unity Developers11 min read

Bare smartphone circuit board on a worn wooden workbench, its graphics chip in focus, with steel tweezers beside it
A smartphone circuit board and its graphics processor, the hardware web games must run on

Unity 6.6 takes WebGPU out of experimental, the Web Graphics team announced on 24 August 2026, but WebGL 2 stays the default and Unity advises keeping it as the fallback. For anything that has to open from a link on a phone, build the WebGL 2 version first and add WebGPU only where a feature needs it. The limits browsers impose on threads, networking, audio and memory apply either way.

Which browsers and devices Unity supports

Unity’s browser compatibility page lists two mobile browsers: iOS Safari 15 and newer, and Chrome 58 and newer on Android. Safari releases earlier than 15 lack WebGL 2 altogether. On desktop, Unity supports Chrome, Firefox, Safari on macOS and Edge, in a browser that is WebGL 2-capable, HTML5 standards-compliant, 64-bit and able to run WebAssembly. WebAssembly is the format Unity compiles your project’s code into, so a browser without it cannot run the build.

A minimum version is not a sensible target. Unity recommends the latest browsers and warns that “Older versions might have issues that affect performance or prevent Unity content from running.” Agree a short list of real phones and browsers your audience uses, and test on those.

There are three routes to a phone: its own browser, a Progressive Web App template that lets the site sit on the home screen like an installed app, or a WebView, a browser panel embedded inside a native app. If the experience lives inside an existing native app, a WebView may avoid building a second renderer. Test in the route you will actually ship.

WebGPU or WebGL 2: what changed in Unity 6.6

The announcement says that “as of Unity 6000.6, the WebGPU graphics API is no longer experimental”. WebGPU is the newer interface a web page uses to drive the device’s graphics chip, and its main gain is compute shaders: code that runs general calculations on the graphics chip rather than only drawing pixels. They bring rendering features into the browser that WebGL cannot run, including GPU Resident Drawing and GPU Occlusion Culling, STP upscaling, VFX Graph, Adaptive Probe Volumes and Compute Skinning.

WebGPU is still not switched on by default. Unity’s comparison page describes WebGL 2 as “compatible with most devices and browsers” and WebGPU as having limited browser and device support. WebGPU compatibility mode, in the table below, is a more limited form of WebGPU for older graphics hardware, which Unity drops to automatically before giving up on WebGPU altogether.

WebGL 2 WebGPU in Unity 6.6
Status Default graphics API Fully supported, not on by default
Reach, per Unity’s manual Most devices and browsers Limited browser and device support
Compute features (VFX Graph, STP, Adaptive Probe Volumes, GPU Resident Drawing, Compute Skinning) Not available Available
Hosting Works over HTTP, but multithreading needs a secure context, and Chrome and Firefox only natively support Brotli over HTTPS Only exposed over HTTPS; otherwise falls back to WebGL 2
Fallback order Is itself the last fallback WebGPU, then compatibility mode on older graphics hardware, then WebGL 2, if it is in the Graphics APIs list in Player Settings

Take WebGL 2 out of that list and anyone whose browser lacks WebGPU sees nothing. The team’s advice is “Keep WebGL 2 in your Graphics APIs list”, because without it, “if WebGPU is not available on a browser, the project will not run.” The fallback is silent too: “a published build can quietly be running on WebGL 2”, and browsers only offer WebGPU in a secure context, so a test build opened from a local file or over plain HTTP never uses it.

Unity’s sources stop short of the question that matters most for a phone audience: which of those phones get WebGPU. The announcement gives no browser versions and points readers to caniuse.com instead, the comparison page still calls support limited, and neither says whether a WebView inside a native app exposes WebGPU. The safe planning assumption is that a phone gets WebGL 2 until a build has shown otherwise, which makes the WebGL 2 version the one to design and sign off first. Check caniuse.com when you scope and again before launch, as browser support moves between releases.

The proof comes from the build itself. Log SystemInfo.graphicsDeviceType at startup, or show it in a small debug overlay. Then open the HTTPS build on each phone on the list, and inside the WebView if that is the route you ship. It reports WebGPU, or OpenGLES3 for a build running on WebGL 2. Record that next to each test result, so a bug report about missing particle effects can be traced to a phone that never left WebGL 2.

You also get a say in who receives WebGPU. Graphics Device Filtering, new in Unity 6.6, lets you write rules that allow or deny WebGPU on specific devices or drivers. The team says this “puts the fallback policy in your hands rather than leaving it entirely to browser capability detection.” If testing shows broken shadows on one phone model, a rule denying WebGPU for that device or its graphics driver sends its owners to the WebGL 2 version, while everyone else stays on WebGPU.

“I have seen both cases where, given the same features, WebGPU is more performant and WebGL is more performant,” Brendan Duncan of the Web Graphics team wrote in a forum reply on 25 August 2026. So turn WebGPU on for a compute feature rather than for speed, and give the WebGL 2 version a stand-in for each one. A VFX Graph effect can become a capped particle count in Unity’s standard Particle System, and lighting from Adaptive Probe Volumes can be approximated with baked light probes. Choose between them at runtime with the same SystemInfo.graphicsDeviceType check.

The browser limits that haven’t moved

These limits come from the browser, so in a project like our Ethereum Towers world, one Unity codebase running on Meta Quest headsets and in the browser through WebGL, they bind only the browser version.

C# code runs on a single thread in the browser, because WebAssembly has no garbage collector that works across threads, according to Unity’s technical limitations page. A route planner that recalculates on every tap, or a configurator working through hundreds of pricing rules, therefore holds up the page while it thinks. More threads are available to the engine’s native code and to C# jobs compiled with Burst, Unity’s optimising compiler, but only with the setting enabled and the page in a secure context with the right cross-origin headers. Without those, split the work into batches and have a coroutine process one batch per frame, so the page keeps drawing and the price appears a few frames later instead of the screen freezing.

A multiplayer game built on raw sockets needs rework before it runs in a tab. Browsers don’t allow direct access to IP sockets, and .NET’s System.Net classes aren’t supported, which leaves the two routes in Unity’s web networking guidance: UnityWebRequest, which goes through the browser’s Fetch API, or Unity’s Netcode package, which supports the Web platform. Requests through UnityWebRequest are subject to CORS, a rule under which a server on another web address must authorise the Unity content with Access-Control headers before the browser lets it read the response. If the backend belongs to the client or a third party, ask for that change early, because it is a server setting your developers cannot make themselves. The browser takes over caching as well: web builds don’t support Unity’s own Cache or Caching API, and requests for asset data and AssetBundles go into the browser cache, which can keep serving an old copy after an update. Give each release’s asset files new names, for example by including a content hash.

No audio plays until the visitor clicks, taps or presses a key. Unity’s web audio is built on the browser’s Web Audio API and supports only basic features. On Audio Mixers, “Volume is the only property you can change on Web,” according to Unity’s audio documentation, and mixer sound effects aren’t supported. Have the loader show a Start button once the first screen’s assets arrive; the tap starts audio and opens that screen, and the remaining assets stream in behind a small progress indicator. A mix that relies on mixer effects, such as reverb in one room, needs those effects baked into the audio files instead.

Physics results in the browser can differ slightly from the Editor and other platforms. That matters where every device has to agree, as in lockstep multiplayer, where every player’s device runs the same simulation, or replays rebuilt from recorded inputs. Unity puts it down to WebAssembly handling very small floating-point values, known as denormal numbers, differently, and warns that the small deviations can accumulate into noticeable differences in behaviour such as collision detection.

Switch to another tab and the content slows down. With Run in background enabled, a hidden tab only updates once per second in most browsers, and without it the content stops, according to the performance page. A countdown that advances a little each frame will fall behind while the tab is hidden, so work it out from real elapsed time, such as a start time sent by your server. A live connection that expects a regular heartbeat may be dropped by the server; listen for the browser’s visibilitychange event through a small JavaScript plug-in, and reconnect and resync state when the visitor returns.

Memory and download size decide the phone experience

On iOS, a web build that runs out of memory doesn’t fail politely: the tab reloads, and the configurator the visitor was halfway through is gone. Brendan Duncan, in a forum reply on 28 September 2026, called those reloads the worst failure: “OOM errors (or rather, tab reboots), especially on iOS, are the worst!”

How much memory a build gets depends on the device, operating system, browser and other open tabs, and while the defaults suit desktop, “for mobile browsers you need to use the advanced tuning options”, according to Unity’s memory guidance. Those sit in the Web Player Settings: Initial Memory Size (what the build reserves when it starts), Maximum Memory Size (the most it may grow to) and Memory Growth Mode.

Unity gives no memory figure for any phone, and the right one depends on the scenes, textures and code in your own project, so measure the heap, the memory the build works with while running, during typical use and at the heaviest moment. Set Initial Memory Size near the typical figure and keep Maximum Memory Size above the peak. Then run the test most likely to catch a tab reload before a visitor does: the oldest phone on your list, a few other tabs open, a play-through of the heaviest scene.

To keep the first download small, Unity’s mobile optimisation guide recommends Addressables, so content is fetched when a scene asks for it rather than all at startup; Brotli compression; and ASTC, a compressed texture format suited to mobile graphics chips. Chrome and Firefox only natively support Brotli over HTTPS.

The only size limit in Unity’s sources is the 1 GB compressed cap for builds hosted on Unity Play, which is an upload limit, not a target for a phone on mobile data. Set your own by measurement. Open the HTTPS build in a desktop browser’s developer tools with throttling set to a mobile connection profile, reload, and add up the transferred size of every file fetched before the Start button appears. Write that total down with the time to the Start button for every build, so growth shows up in the build that caused it, then repeat the load on the slowest phone on your list over real mobile data.

Sending drawing commands through WebGL takes more CPU time than native OpenGL, even though GPU performance on the web is close to native, according to Unity’s performance considerations. Each draw call therefore costs more than it would in an app. Cut them with instancing, where many copies of the same object are drawn in one go, and with batching, then connect a development build to Unity’s Profiler on the weakest phone on your list. That phone, not a desktop, sets the draw-call budget: lower the count until its frame rate holds.

Four things to settle before the first build

Each of these needs someone who owns it in a WebGL project:

  • The oldest phone and browser that must work, and real devices to test on. Whoever holds the audience data owns this, and analytics from an existing website can show which phones visitors actually arrive on.
  • HTTPS with Brotli on the web server before the first test build, and, if multithreading is on, the Cross-Origin-Opener-Policy, Cross-Origin-Embedder-Policy and Cross-Origin-Resource-Policy headers Unity lists. These belong to whoever runs the server, which may be the client’s IT team or a hosting provider rather than the developers.
  • Which features need WebGPU and what the WebGL 2 version shows instead, agreed before any art is built around them, with screenshots from both versions in the visual sign-off.
  • CORS enabled on the backend for the web build’s address before integration testing starts, covering any staging address used in testing as well as the live one.

Switch WebGPU on when a signed-off feature depends on compute and the client is content for its WebGL 2 stand-in to be what any visitor without WebGPU sees. For a configurator or showroom with no such feature, WebGL 2 alone reaches every supported browser and leaves one version to test. If you are planning something that has to open from a link on a phone, get in touch and we can work out which devices it needs to reach.

Keep reading