From dc4e994eade5778185a4f74f5f4987c1e492d711 Mon Sep 17 00:00:00 2001 From: Janine Liu Date: Tue, 19 Nov 2024 17:14:26 -0500 Subject: [PATCH 1/2] Call Resolve in SampleHeightMostDetailed --- Source/CesiumRuntime/Private/Cesium3DTileset.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp index 26b8b2d14..0da873522 100644 --- a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp +++ b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp @@ -131,6 +131,12 @@ void ACesium3DTileset::SetMobility(EComponentMobility::Type NewMobility) { void ACesium3DTileset::SampleHeightMostDetailed( const TArray& LongitudeLatitudeHeightArray, FCesiumSampleHeightMostDetailedCallback OnHeightsSampled) { + // It's possible to call this function before a Tick happens, so make sure + // that the necessary variables are resolved. + this->ResolveGeoreference(); + this->ResolveCameraManager(); + this->ResolveCreditSystem(); + if (this->_pTileset == nullptr) { this->LoadTileset(); } From e9aea1785f42b73d82cc8902e6380ef7e0d9bad1 Mon Sep 17 00:00:00 2001 From: Janine Liu Date: Tue, 19 Nov 2024 17:16:40 -0500 Subject: [PATCH 2/2] Update changelog --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 2ee999333..6adde6a3d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Change Log +### ? - 2024-12-02 + +##### Fixes :wrench: + +- Fixed a crash that could occur when using `SampleHeightMostDetailed` on a `Cesium3DTileset` with a raster overlay. + ### v2.10.0 - 2024-11-01 ##### Additions :tada: