diff --git a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp index 7b1984758..911d770f9 100644 --- a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp +++ b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp @@ -1503,6 +1503,22 @@ std::vector ACesium3DTileset::GetSceneCaptures() const { continue; } + // Take the show-only / hidden list of actors into consideration + bool bDoesSceneCaptureRenderTileset = false; + if (pSceneCaptureComponent->PrimitiveRenderMode == + ESceneCapturePrimitiveRenderMode::PRM_UseShowOnlyList) { + bDoesSceneCaptureRenderTileset = + pSceneCaptureComponent->ShowOnlyActors.ContainsByPredicate( + [this](auto const& ActorPtr) { return this == ActorPtr; }); + } else { + bDoesSceneCaptureRenderTileset = + !pSceneCaptureComponent->HiddenActors.ContainsByPredicate( + [this](auto const& ActorPtr) { return this == ActorPtr; }); + } + if (!bDoesSceneCaptureRenderTileset) { + continue; + } + FVector2D renderTargetSize(pRenderTarget->SizeX, pRenderTarget->SizeY); if (renderTargetSize.X < 1.0 || renderTargetSize.Y < 1.0) { continue;