Cesium Error when compiling on Manjaro

I follow the developer instructions to build the Cesium for Unity package, but when I get to the step where you need to compile the native~ library, I get these errors:
fatal error: DotNet/CesiumForUnity/Cesium3DTileset.h: No such file or directory
fatal error: DotNet/System/Action.h: No such file or directory
fatal error: DotNet/CesiumForUnity/IonAssetsColumn.h: No such file or directory
fatal error: DotNet/System/Object.h: No such file or directory
fatal error: DotNet/CesiumForUnity/Helpers.h: No such file or directory
fatal error: DotNet/System/String.h: No such file or directory
fatal error: DotNet/CesiumForUnity/IonTokenSource.h: No such file or directory

I am using dotnet SDK version 7.0.200
I am using GCC 12
I am using the newest manjaro kernel
I am using CMake 3.25.2

It seems that the dotnet CLI didn’t generate the required .h files. There are no files in the com.cesium.unity/Reinterop~/Generated directory. However the dotnet CLI did successfullty generate the Reinterop.dll file.

Is there anything I’m doing wrong? How can I fix this?

Did you open the Cesium for Unity Samples project in the Unity Editor? This will cause Unity to compile the plugin’s C# code, which will in turn cause it to generate the C++ code. The dotnet CLI step is only to build the Roslyn code generator, it does not actually run the code generation as that must be done within Unity.

It didn’t help, I still get the same errors.

Can you share your Editor log from when you launched Unity with the Samples project?

The .h files aren’t generated.

Logs.zip (12.6 KB)

The actual Editor log:
Editor.zip (36.1 KB)

I can see from the log that you’re missing Reinterop. That’s the tool that generates the .h files, so that’s why they’re not being generated. There are two reasons that can happen.

One is that you didn’t run dotnet publish Reinterop~ -o . from the com.cesium.unity directory.

The other is that you did, but you forgot to do that until after you had launched Unity for the first time, so the Reinterop.dll file was missing, so Unity deleted the .meta file. And so even when you later did build Reinterop and Unity regenerated the .meta file, it still doesn’t work because the information in the .meta file that tells Unity to use it as a Roslyn plugin has been lost.

Long story short, make sure you’ve built/published Reinterop and that you’re using the original Reinterop.dll.meta from the cesium-unity repo.


Thank you so much, It fixed the issue!