Skip to content

Conversation

@brendan-duncan
Copy link

@brendan-duncan brendan-duncan commented Oct 20, 2025

Description

Add support for building Cesium for Unity Web. This will build cesium-native and all dependencies with the Emscripten that is included with Unity, as part of the build process similar to building for other native platforms.

This will require Unity 6.0+ to build for the web as it requires support for C/C++ Native Multithreading. Previous versions of Unity did not have this option.
In the Unity Project Settings, select Player, Web Platform, Publishing Settings, and turn on the Enable C/C++ Native Multithreading option.

This currently only works building the static libs in the Plugins/WebGL on Windows. The resulting libraries can be used by other platforms.

The ninja executable must be found the PATH. It would be nice if this were automatically handled by CMake or installed with vcpkg but I don't know how to do that.

Some of the changes needed to get things to build are:

  • If the path to Unity's Emscripten has a space in it, use subst to map the Emscripten directory to M: drive.
  • blend2d is added as a submodule and built locally due to the evcpkg version causing build errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant