Cesium for Unity: Create 3D geospatial apps for the web

BRENDAN DUNCAN / UNITY TECHNOLOGIESStaff Graphics Engineer
Mar 16, 2026
Cesium for Unity

Brendan Duncan is a staff engineer for Unity Technologies focusing on web graphics, implementing the WebGL and WebGPU graphics driver used by the Unity web player.

What is Cesium for Unity?

Cesium for Unity is a powerful plugin that integrates Cesium's geospatial platform into the Unity engine. It empowers developers to stream high-resolution 3D terrain, imagery, and buildings from Cesium ion or other sources. The result is the ability to create photorealistic virtual globes and detailed geographic visualizations within a Unity project.

Developers can build and deploy their geospatially-accurate 3D applications directly to the web. This major update, starting with Cesium for Unity 1.20.0, combines the power of Cesium's global 3D content with the accessibility of Unity’s web deployment, removing the need for app stores or user installations.

At its core, the plugin uses the 3D Tiles OGC Community Standard, pioneered by Cesium. This open standard is specifically designed for streaming massive 3D geospatial datasets. With it, you can render entire cities, countries, or even a full-scale digital twin of Earth without overwhelming your system’s memory or your user's bandwidth.

Combining Cesium for Unity with web deployment unlocks remarkable possibilities. Users can explore intricate, real-world 3D environments with nothing more than a URL, lowering the barrier to broad-use applications and experiences. This makes it an ideal solution for training tools, urban planning visualizations, interactive mapping experiences, and many more.

Cesium for Unity
Cesium for Unity

Key features for web deployment

Cesium for Unity includes capabilities that are particularly effective in web environments:

  • Streaming architecture means users do not have to download entire datasets at the start. Instead, terrain and imagery tiles load progressively as users navigate the scene. This approach keeps initial load times short and performance smooth.
  • Easy access to curated 3D geospatial content and 3D tiling pipelines, via integration with Cesium ion cloud services. Users can tap into global terrain including Cesium World Terrain and Google Photorealistic 3D Tiles, as well as imagery, buildings, and photogrammetry datasets. All available via one-click access using the built-in Cesium ion UI in Unity Editor, and can be deployed directly to users on the web.

Real-world applications

The combination of Cesium for Unity and Web opens doors for many geospatial applications, such as:

  • Urban planners can share interactive 3D city models with stakeholders through simple web links.
  • Educators can create explorable geographic lessons that students access from any device.
  • Emergency management teams can visualize disaster scenarios in accurate terrain without specialized software installations.
  • Tourism applications can let users virtually explore destinations in photorealistic 3D.
  • Real estate developers can showcase properties in geographic context.
  • Researchers can create interactive data visualizations that combine scientific datasets with accurate geographic representation.

Getting started with Cesium for Unity for the web

If this is your first introduction to Cesium for Unity, follow the quickstart guide. After installing the plugin, configure your Cesium ion access token, add the CesiumGeoreference component to define your world’s coordinate system, and begin adding tilesets.

For building to the web, follow these essential steps:

Update to v1.20.0+: Ensure you have the latest version of the Cesium for Unity package.

Use Unity 6+: These versions are optimized for modern WebGL and WebGPU standards.

Enable multithreading: You must enable Native C/C++ Multithreading in your Player Settings for the web build.

Increase memory limits: Cesium tilesets can be memory-intensive. You may need to increase the web player's memory limit, which can be set up to 4GB.

Configure server headers: When deploying your project to a web server, your server must include specific COOP and COEP headers to enable multithreading. This is a security requirement.

It is important to note that web support is currently categorized as "experimental." Some advanced features or high-memory tilesets may require careful optimization to perform well within browser memory constraints.

Technical deep dive: Porting to the web

Compiling for WebAssembly

The core of Cesium Native is written in C++. To run this code in a browser, it must be compiled into WebAssembly using a toolchain called Emscripten. A primary challenge is that Cesium code typically targets 64-bit platforms, while Unity's WebAssembly support is currently 32-bit. This requires code modification to be architecture-independent. Additionally, some third-party libraries used by Cesium need patches to ensure compatibility.

Re-engineering for multithreading

Cesium for Unity relies heavily on multithreading to stream 3D Tiles without impacting the main application thread. However, Unity’s web platform only supports multithreading for native C++ code, not for managed C# code. A custom C++ thread pool was implemented specifically for web builds to handle this limitation. Work that needs to interact with Unity, like creating meshes, is queued and executed on the main thread to avoid memory errors, keeping background work in native C++ and minimizing main thread impact.

Graphics APIs: WebGL and WebGPU

Browsers offer two main 3D graphics APIs: the established WebGL and the newer WebGPU. Cesium for Unity works by both creating standard Unity Mesh and Texture objects, leaving the rendering work to the engine. While largely equivalent for Cesium rendering, there are minor differences. For example, the Cesium point shader uses features only available in WebGPU, meaning point cloud rendering requires it. WebGPU also opens the door for other advanced Unity features like the VFX Graph.

Performance considerations on the web

Web builds naturally have different performance profiles than native applications. Cesium is already well-suited for these constraints, with level-of-detail systems that automatically adjust quality to maintain smooth framerates. Its streaming approach is also a major benefit, as only visible data is loaded.

However, developers should be mindful of WebAssembly's limitations. Execution speed is near-native but not identical due to security sandboxing. Web builds cannot directly access the file system, and memory is currently limited to 32-bit (4GB). A project that runs well on a desktop may require optimization, such as reducing quality settings or scope, to perform smoothly on the web.

Snowdown Towers from Autodesk Revit visualized on the web with Cesium for Unity.
Snowdown Towers from Autodesk Revit visualized on the web with Cesium for Unity.

The future of geospatial on the web

As browser technology and WebAssembly continue to mature, the gap between web and native application performance will shrink. Cesium for Unity is positioned at the forefront of this evolution, allowing developers to create geospatial experiences that are both powerful and universally accessible.

This combination of Unity's creative suite, Cesium's geospatial platform, and the web's reach, opens up compelling new opportunities for developers. From professional visualization tools to immersive educational experiences, this provides the foundation to bring accurate, beautiful 3D worlds to browsers across the globe.