@@ -3197,8 +3197,8 @@ static void loadPrimitiveGameThreadPart(
31973197 pBaseMaterial,
31983198 ImportedSlotName);
31993199 if (pMaterialForGltfPrimitive) {
3200- // pMaterialForGltfPrimitive created above may not have used the suggested
3201- // pBaseMaterial passed as input
3200+ // pMaterialForGltfPrimitive created above may not have used the
3201+ // suggested pBaseMaterial passed as input
32023202 pBaseMaterial = pMaterialForGltfPrimitive->Parent .Get ();
32033203 // may have changed but we don't need it from now on:
32043204 pUserDesignatedMaterialAsDynamic = nullptr ;
@@ -3559,8 +3559,7 @@ UCesiumGltfComponent::CreateOffGameThread(
35593559
35603560void UCesiumGltfComponent::OnVisibilityChanged () {
35613561 USceneComponent::OnVisibilityChanged ();
3562- auto * pLifecycleEventReceiver =
3563- Cast<ACesium3DTileset>(GetOuter ())->GetLifecycleEventReceiver ();
3562+ auto * pLifecycleEventReceiver = GetTilesetActor ().GetLifecycleEventReceiver ();
35643563 if (pLifecycleEventReceiver)
35653564 pLifecycleEventReceiver->OnVisibilityChanged (*this , GetVisibleFlag ());
35663565}
@@ -3603,6 +3602,10 @@ const Cesium3DTilesSelection::TileID& UCesiumGltfComponent::GetTileID() const {
36033602 return pTile->getTileID ();
36043603}
36053604
3605+ ACesium3DTileset& UCesiumGltfComponent::GetTilesetActor () {
3606+ return *Cast<ACesium3DTileset>(GetOuter ());
3607+ }
3608+
36063609FVector
36073610UCesiumGltfComponent::GetGltfToUnrealLocalVertexPositionScaleFactor () const {
36083611 // Note: replicates logic from (static) loadPrimitive
0 commit comments