Error installing Cesium for Unity - "compilation errors" on fresh project

Hello Cesium community,

I’ve been trying to install Cesium for Unity for over 6 hours, but keep getting compilation errors on every attempt. I need help to resolve this issue.

My Environment:

  • OS: Windows 10/11

  • Unity Version: Tried both Unity 2022.3.62f3 LTS and Unity 6000.3.4f1

  • Cesium for Unity: Latest version (1.21.0)

  • Installation Method: Git URL via Package Manager

What I’ve tried:

  1. :white_check_mark: Created multiple fresh/new projects

  2. :white_check_mark: Tried both Unity 2022.3 LTS and Unity 6

  3. :white_check_mark: Deleted all Unity cache folders (%LOCALAPPDATA%\Unity\cache)

  4. :white_check_mark: Deleted Library, Packages, and Temp folders from projects

  5. :white_check_mark: Installed Linux Build Support (IL2CPP)

  6. :white_check_mark: Used English-only file paths (e.g., C:\CesiumTest)

  7. :white_check_mark: Ran Unity Hub as Administrator

  8. :white_check_mark: Tried Git URL method: https://github.com/CesiumGS/cesium-unity.git

  9. :white_check_mark: Tried Scoped Registry method (got SSL error)

  10. :white_check_mark: Completely uninstalled and reinstalled Unity

The Error: Every time I install Cesium, I get this dialog when opening the project:

“The project you are opening contains compilation errors. Entering Safe Mode allows you to resolve these errors without waiting for the rest of your project to import.”

Console shows errors like:

  • error CS8795: Partial method 'TestReinterop.cs(13,29)' must have implementation

  • A meta data file (.meta) exists but its asset 'Packages/com.cesium.unity/Reinterop.dll' can't be found

  • Couldn't delete Packages/com.cesium.unity/Reinterop.dll.meta because it's in an immutable folder

What I want to create: A flying game where players can fly over the Earth, enjoy scenery and night views, and land to walk around. That’s why I chose Cesium.

Questions:

  1. Is there a known issue with Cesium for Unity 1.21.0 on Windows?

  2. Should I try an older version like 1.11.0?

  3. Are there any special Windows security settings that might block installation?

  4. Could this be related to the issue discussed here: [link to the forum thread you found]

I really want to use Cesium for my project. Any help would be greatly appreciated!

Thank you.

Hi @anon73692511, welcome to the community!

Cesium for Unity cannot be installed via a git URL in the package manager. The reason is that it contains native C++ code which must be compiled for each target platform. You have two options:

  1. Install using the scoped package registry. Instructions can be found here.
  2. Pull the cesium-unity GitHub repo and build it manually by following the developer setup instructions.

I just saw your note that the scoped registry method gave you an SSL error. The scoped registry pulls the package from the GitHub releases page, so perhaps your system or network is unable to access it for some reason? If you’re able to download the tgz file release package somehow, then you can bypass the scoped registry and install it directly from disk using the Unity Package Manager, as described here.