Skip to content

Commit 52bd20d

Browse files
committed
Minor code tweaks.
1 parent 4bb28fe commit 52bd20d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Source/CesiumRuntime/Private/CesiumGltfComponent.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3544,8 +3544,11 @@ UCesiumGltfComponent::CreateOffGameThread(
35443544
}
35453545
}
35463546
}
3547-
if (auto* Receiver = pTilesetActor->GetLifecycleEventReceiver())
3547+
3548+
if (ICesium3DTilesetLifecycleEventReceiver* Receiver =
3549+
pTilesetActor->GetLifecycleEventReceiver()) {
35483550
Receiver->OnTileLoaded(*Gltf);
3551+
}
35493552

35503553
Gltf->SetVisibility(false, true);
35513554
Gltf->SetCollisionEnabled(ECollisionEnabled::NoCollision);
@@ -3554,7 +3557,8 @@ UCesiumGltfComponent::CreateOffGameThread(
35543557

35553558
void UCesiumGltfComponent::OnVisibilityChanged() {
35563559
USceneComponent::OnVisibilityChanged();
3557-
auto* pLifecycleEventReceiver = GetTilesetActor().GetLifecycleEventReceiver();
3560+
ICesium3DTilesetLifecycleEventReceiver* pLifecycleEventReceiver =
3561+
GetTilesetActor().GetLifecycleEventReceiver();
35583562
if (pLifecycleEventReceiver)
35593563
pLifecycleEventReceiver->OnTileVisibilityChanged(*this, GetVisibleFlag());
35603564
}
@@ -3590,9 +3594,10 @@ UCesiumGltfComponent::UCesiumGltfComponent() : USceneComponent() {
35903594
}
35913595

35923596
const CesiumGltf::Model* UCesiumGltfComponent::GetGltfModel() const {
3593-
if (pTile)
3597+
if (pTile) {
35943598
if (auto RenderContent = pTile->getContent().getRenderContent())
35953599
return &RenderContent->getModel();
3600+
}
35963601
return nullptr;
35973602
}
35983603

0 commit comments

Comments
 (0)