Skip to content

Commit 85103cd

Browse files
committed
Expose model tuning version in a public interface for loaded tiles
1 parent 35eba16 commit 85103cd

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Source/CesiumRuntime/Private/CesiumGltfComponent.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3536,6 +3536,13 @@ UCesiumGltfComponent::UCesiumGltfComponent() : USceneComponent() {
35363536
PrimaryComponentTick.bCanEverTick = false;
35373537
}
35383538

3539+
int32 UCesiumGltfComponent::GetTuningVersion() const {
3540+
if (pTile && pTile->getContent().getRenderContent()) {
3541+
return pTile->getContent().getRenderContent()->getModel()._tuningVersion;
3542+
}
3543+
return -1;
3544+
}
3545+
35393546
void UCesiumGltfComponent::UpdateTransformFromCesium(
35403547
const glm::dmat4& cesiumToUnrealTransform) {
35413548
for (USceneComponent* pSceneComponent : this->GetAttachChildren()) {

Source/CesiumRuntime/Private/CesiumGltfComponent.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ class UCesiumGltfComponent : public USceneComponent, public ICesiumLoadedTile {
135135

136136
virtual void BeginDestroy() override;
137137

138+
// from ICesiumLoadedTile
139+
int32 GetTuningVersion() const override;
140+
138141
void UpdateFade(float fadePercentage, bool fadingIn);
139142

140143
private:

Source/CesiumRuntime/Public/CesiumLoadedTile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ class UCesiumLoadedTile : public UInterface {
1313
class ICesiumLoadedTile {
1414
GENERATED_BODY()
1515
public:
16+
virtual int32 GetTuningVersion() const = 0;
1617
};
17-

0 commit comments

Comments
 (0)