Skip to content

Commit

Permalink
Merge pull request #1545 from KieranCoppins/1544-polygon-soft-reference
Browse files Browse the repository at this point in the history
Use a soft object reference for cartographic polygons
  • Loading branch information
kring authored Nov 21, 2024
2 parents 2c06e31 + bd53b01 commit 27e8740
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ UCesiumPolygonRasterOverlay::CreateOverlay(
std::vector<CartographicPolygon> polygons;
polygons.reserve(this->Polygons.Num());

for (ACesiumCartographicPolygon* pPolygon : this->Polygons) {
for (auto& pPolygon : this->Polygons) {
if (!pPolygon) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/CesiumRuntime/Public/CesiumPolygonRasterOverlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CESIUMRUNTIME_API UCesiumPolygonRasterOverlay
* The polygons to rasterize for this overlay.
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
TArray<ACesiumCartographicPolygon*> Polygons;
TArray<TSoftObjectPtr<ACesiumCartographicPolygon>> Polygons;

/**
* Whether to invert the selection specified by the polygons.
Expand Down

0 comments on commit 27e8740

Please sign in to comment.