diff --git a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp index d9897c5c9..ce61a882e 100644 --- a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp +++ b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp @@ -707,7 +707,7 @@ class UnrealResourcePreparer TUniquePtr options = MakeUnique( std::move(tileLoadResult)); - if (!options->getModel()) { + if (!options->pModel) { return asyncSystem.createResolvedFuture( Cesium3DTilesSelection::TileLoadResultAndRenderResources{ std::move(options->tileLoadResult), @@ -1901,6 +1901,17 @@ void ACesium3DTileset::updateLastViewUpdateResultState( } } + if (this->LogAssetStats && this->_pTileset) { + const CesiumGltf::SingleAssetDepot* imageDepot = + this->_pTileset->getSharedAssetDepot().getImageDepot(); + UE_LOG( + LogCesium, + Display, + TEXT("Images depot: %d distinct assets, %d total usages"), + imageDepot->getDistinctCount(), + imageDepot->getUsageCount()); + } + if (!this->LogSelectionStats) { return; } diff --git a/Source/CesiumRuntime/Public/Cesium3DTileset.h b/Source/CesiumRuntime/Public/Cesium3DTileset.h index 6edbd5b94..3fdc7b128 100644 --- a/Source/CesiumRuntime/Public/Cesium3DTileset.h +++ b/Source/CesiumRuntime/Public/Cesium3DTileset.h @@ -598,6 +598,13 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor { UPROPERTY(EditAnywhere, Category = "Cesium|Debug") bool LogSelectionStats = false; + /** + * If true, logs stats on the assets in this tileset's asset depot to the + * Output Log. + */ + UPROPERTY(EditAnywhere, Category = "Cesium|Debug") + bool LogAssetStats = false; + /** * If true, draws debug text above each tile being rendered with information * about that tile. diff --git a/extern/cesium-native b/extern/cesium-native index 5ae553947..4851ed2dc 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 5ae5539478e20d4a6f48b03db0b971c8b4dba1e9 +Subproject commit 4851ed2dc2b28365ebe4022a18f3275cf852c552