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

Enum metadata support #1605

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Enum metadata support #1605

wants to merge 3 commits into from

Conversation

azrogers
Copy link
Contributor

@azrogers azrogers commented Feb 5, 2025

Requires CesiumGS/cesium-native#1085 to be merged before this. This change implements enum support for structural metadata in Unreal. The implementation is fairly simple, the scalar values of enums can be obtained using UCesiumMetadataValueBlueprintLibrary::GetInteger or UCesiumMetadataValueBlueprintLibrary::GetInteger64. One wrinkle is in obtaining metadata values as strings - the names corresponding to enum values can only be obtained with the corresponding CesiumGltf::Enum definition. This means that we can't just call UCesiumMetadataValueBlueprintLibrary::GetString on an enum FCesiumMetadataValue, since the metadata value itself doesn't contain enough information to resolve the name. Because of this, I've elected to only implement enum support for UCesiumPropertyTablePropertyBlueprintLibrary::GetString, as with the property table reference we have enough information to resolve the enum names. It would be nice to have full support for GetString on an enum value, but considering our design in Cesium Native I think this might be the best we can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant