CesiumGS / cesium-unity

Bringing the 3D geospatial ecosystem to Unity
https://cesium.com/platform/cesium-for-unity/
Apache License 2.0
347 stars 83 forks source link

Unable to override Cesium credit system because `CesiumCredit` is marked internal #437

Open kring opened 6 months ago

kring commented 6 months ago

For people that want to change how Cesium for Unity renders credits, we recommend the steps here: https://github.com/CesiumGS/cesium-unity/issues/333#issuecomment-1583488794

But this doesn't seem to work anymore because CesiumCredit is internal, so it's impossible to follow those instructions from outside the CesiumRuntime assembly. But the change from public to internal happened before we wrote those instructions, and they did seem to work when they were written, so it's not clear what's happening. We should investigate. Most likely the solution will simply be to make CesiumCredit and related types public.

As reported here: https://github.com/CesiumGS/cesium-unity/issues/333#issuecomment-2002638298

TobiasWehrum commented 6 months ago

But the change from public to internal happened before we changed those instructions, and they did seem to work when they were written, so it's not clear what's happening.

Did you maybe use another way of distribution that places the files directly inside the Asset folder, e.g. unitypackage or the Asset Store? I think without an Assembly Definition it would just become part of the project then, so, internal would not have had any effect.

kring commented 6 months ago

It's a good question, but no, I don't think so. We've always needed an assembly definition in order to arrange for Reinterop to be invoked. It's possible I had the package installed inside my project's Packages directory, rather than installed via the Unity package manager, but it should still be a separate assembly in that scenario.

kring commented 1 month ago

This may not actually be an issue. See here: https://github.com/CesiumGS/cesium-unity/issues/333#issuecomment-2312111464