Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of Enum Support in Cesium Native #1557

Open
rqassimi opened this issue Nov 22, 2024 · 3 comments · May be fixed by #1605
Open

Lack of Enum Support in Cesium Native #1557

rqassimi opened this issue Nov 22, 2024 · 3 comments · May be fixed by #1605
Labels
enhancement New feature or request

Comments

@rqassimi
Copy link

Hello,

We're encountering an issue with the lack of Enum support in Cesium Native.
We're generating tiles and we've added the property type CesiumGltf::ClassProperty::Type::ENUM using the StructuralMetadata glTF extension.
When loading the tiles in Unreal (with the Cesium Unreal Plugin) and trying to read this property using the Blueprint/C++ API, we're getting an ErrorInvalidProperty because CesiumGltf::PropertyTableView::getPropertyView in Cesium Native does not support Enums.
Could you add the support of Enums in getPropertyView?

Thanks for any help you can provide on this.

@j9liu j9liu added the enhancement New feature or request label Nov 25, 2024
@j9liu
Copy link
Contributor

j9liu commented Nov 25, 2024

Thanks for opening this issue @rqassimi ! 😄

It's true that we don't support enums in EXT_structural_metadata. I imagine we'd need to wrap them in something like a MetadataEnum class that can handle the custom mapping between arbitrary names and values.

It probably comes down to taking the scalar values of the enum, and translating them to the name of that value, right? Perhaps a function like FString MetadataEnum.GetValue(int scalar) that returns the name associated with the number. Open to other implementation ideas of course, or suggestions about expected behavior.

@rqassimi
Copy link
Author

rqassimi commented Nov 27, 2024

@j9liu Sounds good to me, but we'd probably be fine just getting the scalar value at least.

@lilleyse
Copy link
Contributor

CC CesiumGS/cesium-native#728

@j9liu j9liu linked a pull request Feb 11, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants