Build errors when importing a custom built cesium unity package

Hello

I’ve packaged Cesium for unity by following these guidelines : https://github.com/CesiumGS/cesium-unity/blob/main/Documentation~/developer-setup.md

However when I reference the created tarball I have the following errors :

This probably comes from a duplicate file in the generated package

002

The duplicate file name is AssemblyMonoScriptTypes.gen.cs

There is probably something I am doing wrong but rather than hacking the generated package I would prefer to benefit from your insights :smiley:

Thanks and Regards

As additional Info I can see that the original Unity package does not contains these folders :
003

Hi @carlopiersanti,

Just to confirm – are you only following those instructions, or are you doing something extra? When you say you “reference the created tarball”, it sounds like you’re trying to add it as a tarball via the Package Manager.

The developer setup instructions allow Cesium for Unity to work in the project as an embedded package. So you shouldn’t have to do anything extra in the Package Manager to get it to work.

I think this is happening because you’re using a newer version from Unity than we usually use to create the tarball (2021.3). The newer version of Unity includes an extra Roslyn source generator that is producing those extra files, and they’re getting swept up in the tarball. The solution is to either use 2021.3 to create the package, or to delete those files from it.

Thank you both for your replies

Regards