diff --git a/CHANGES.md b/CHANGES.md index 6adde6a3d..56efee21a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ ##### Fixes :wrench: - Fixed a crash that could occur when using `SampleHeightMostDetailed` on a `Cesium3DTileset` with a raster overlay. +- `CesiumPolygonRasterOverlay` now references `CesiumCartographicPolygon` instances using `TSoftObjectPtr`, which allows, for example, a raster overlay in the persistent level to use a polygon in a sub-level. ### v2.10.0 - 2024-11-01 diff --git a/Source/CesiumRuntime/Private/CesiumPolygonRasterOverlay.cpp b/Source/CesiumRuntime/Private/CesiumPolygonRasterOverlay.cpp index 66a465a45..3f8a7ba6d 100644 --- a/Source/CesiumRuntime/Private/CesiumPolygonRasterOverlay.cpp +++ b/Source/CesiumRuntime/Private/CesiumPolygonRasterOverlay.cpp @@ -28,7 +28,7 @@ UCesiumPolygonRasterOverlay::CreateOverlay( std::vector polygons; polygons.reserve(this->Polygons.Num()); - for (ACesiumCartographicPolygon* pPolygon : this->Polygons) { + for (auto& pPolygon : this->Polygons) { if (!pPolygon) { continue; } diff --git a/Source/CesiumRuntime/Public/CesiumPolygonRasterOverlay.h b/Source/CesiumRuntime/Public/CesiumPolygonRasterOverlay.h index abf154bb8..728ecc231 100644 --- a/Source/CesiumRuntime/Public/CesiumPolygonRasterOverlay.h +++ b/Source/CesiumRuntime/Public/CesiumPolygonRasterOverlay.h @@ -29,7 +29,7 @@ class CESIUMRUNTIME_API UCesiumPolygonRasterOverlay * The polygons to rasterize for this overlay. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") - TArray Polygons; + TArray> Polygons; /** * Whether to invert the selection specified by the polygons.