From b1b036855de657e74934b8daca0ce94c859de4dc Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 3 Oct 2024 15:26:52 +1000 Subject: [PATCH] Cleanup, make some useful warnings visible. --- .../CesiumRuntime/Private/CesiumGltfComponent.cpp | 13 +++++-------- Source/CesiumRuntime/Private/CesiumGltfComponent.h | 1 - Source/CesiumRuntime/Private/CesiumGltfTextures.h | 4 ++-- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index cc535c220..931249e0d 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -1766,9 +1766,10 @@ static void loadIndexedPrimitive( } else { UE_LOG( LogCesium, - VeryVerbose, + Warning, TEXT( - "Skip loading primitive due to invalid component type in its index accessor.")); + "Ignoring a glTF primitive because the componentType (%d) of its indices is not supported."), + indexAccessorGltf.componentType); } } @@ -2132,8 +2133,8 @@ void applyGltfUpAxisTransform(const Model& model, glm::dmat4x4& rootTransform) { } else { UE_LOG( LogCesium, - VeryVerbose, - TEXT("Unknown gltfUpAxis value: {}"), + Warning, + TEXT("Ignoring unknown gltfUpAxis value: {}"), gltfUpAxisValue); } } @@ -3258,10 +3259,6 @@ UCesiumGltfComponent::UCesiumGltfComponent() : USceneComponent() { PrimaryComponentTick.bCanEverTick = false; } -UCesiumGltfComponent::~UCesiumGltfComponent() { - UE_LOG(LogCesium, VeryVerbose, TEXT("~UCesiumGltfComponent")); -} - void UCesiumGltfComponent::UpdateTransformFromCesium( const glm::dmat4& cesiumToUnrealTransform) { for (USceneComponent* pSceneComponent : this->GetAttachChildren()) { diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.h b/Source/CesiumRuntime/Private/CesiumGltfComponent.h index a55d8b57c..e78b2d273 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.h +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.h @@ -91,7 +91,6 @@ class UCesiumGltfComponent : public USceneComponent { bool createNavCollision); UCesiumGltfComponent(); - virtual ~UCesiumGltfComponent(); UPROPERTY(EditAnywhere, Category = "Cesium") UMaterialInterface* BaseMaterial = nullptr; diff --git a/Source/CesiumRuntime/Private/CesiumGltfTextures.h b/Source/CesiumRuntime/Private/CesiumGltfTextures.h index 7f0326ad1..d3a7544d1 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfTextures.h +++ b/Source/CesiumRuntime/Private/CesiumGltfTextures.h @@ -15,8 +15,8 @@ struct Model; class CesiumGltfTextures { public: /** - * Creates all of the textures that are required by the given glTF, and adds - * `ExtensionUnrealTexture` to each. + * Creates all of the texture resources that are required by the given glTF, + * and adds `ExtensionImageCesiumUnreal` to each. */ static CesiumAsync::Future createInWorkerThread( const CesiumAsync::AsyncSystem& asyncSystem,