Support for KHR_materials_variants

Hello all,

I am generating 3D tiles supporting the Material Variants extension and wanted to expose support for this in Cesium for Unity. I now have a working prototype which includes changes to cesium-native and cesium-unity to properly expose the extension fields and allow run-time switching of textures.

I saw in the git repo it was recommended to create a forum thread before creating a pull request, so I just wanted to make sure there was interest in this, and that it would be appropriate to submit as a PR.

You mentioned changes in cesium-native. Note that in principle, KHR_materials_variants is already supported - see the issue around Support for `KHR_materials_variants` in `cesium-native` and implementations · Issue #676 · CesiumGS/cesium-native · GitHub

But… maybe there have to be additional changes in cesium-native when this extension should be supported more thoroughly in Cesium For Unity (or Cesium For Unreal).

Hi @Matthew_Deardorff, welcome to the community!

We definitely encourage you to submit a PR! If it’s just prototype-level work so far, that’s ok. Just open a draft pull request. This way we may be able to provide some early guidance to increase the chances that we’re able to merge it later.

Thanks for your interest in contributing to Cesium for Unity!