From 06bd28d5b1a2df3099b4f87fc867973172e03d2f Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Mon, 2 Sep 2024 18:53:21 +0200 Subject: [PATCH] fix the non-existent default hand-mesh warnings polluting the logs when packaging the game --- Handbook/src/appendix/changelog.md | 1 + .../Components/SGVirtualHandComponent.cpp | 32 +++++++++++++------ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Handbook/src/appendix/changelog.md b/Handbook/src/appendix/changelog.md index b5dae6ef..4df80c93 100644 --- a/Handbook/src/appendix/changelog.md +++ b/Handbook/src/appendix/changelog.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix the wrong script name for `USGHMDTrackerKismetLibrary`. - Fix the wrong script name for `USGXRTrackerKismetLibrary `. - Fix `LogPython: Warning: 'SGHMDTrackerKismetLibrary' and 'SGXRTrackerKismetLibrary' have the same name (SenseGloveHeadMountDisplayKismetLibrary) when exposed to Python. Rename one of them using 'ScriptName' meta-data.` when packaging the game. +- Fix the non-existent default hand-mesh warnings polluting the logs when packaging the game. - Expanded the clickable area on the handbook index page revision buttons. - Minor documentation fixes. diff --git a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp index 5e1c7fba..c1316046 100644 --- a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp +++ b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp @@ -651,17 +651,26 @@ bool USGVirtualHandComponent::FImpl::IsUsingUserMesh() const USkeletalMesh* USGVirtualHandComponent::FImpl::LoadDefaultMesh() const { - const FString DefaultMeshPath{GetDefaultMeshPath()}; - USkeletalMesh* DefaultMesh{ - Cast(StaticLoadObject(USkeletalMesh::StaticClass(), nullptr, *DefaultMeshPath)) - }; + // FIXME + // Disable this warning altogether as it results in polluting the packaging logs, at least until we ship a set of + // virtual hand meshes again. + // const FString DefaultMeshPath{GetDefaultMeshPath()}; + // USkeletalMesh* DefaultMesh{ + // Cast(StaticLoadObject(USkeletalMesh::StaticClass(), nullptr, *DefaultMeshPath)) + // }; - if (!IsValid(DefaultMesh)) - { - SGLOG_WARNING(FString::Printf(TEXT("Failed to load the default skeletal mesh: '%s'"), *DefaultMeshPath)); - } + // FIXME + // Disable this warning altogether as it results in polluting the packaging logs, at least until we ship a set of + // virtual hand meshes again. + // if (!IsValid(DefaultMesh)) + // { + // SGLOG_WARNING(FString::Printf(TEXT("Failed to load the default skeletal mesh: '%s'"), *DefaultMeshPath)); + // } - return DefaultMesh; + // FIXME + //return DefaultMesh; + + return nullptr; } void USGVirtualHandComponent::FImpl::SetDefaultMesh() const @@ -677,7 +686,10 @@ void USGVirtualHandComponent::FImpl::SetDefaultMesh() const //Owner->SetSkeletalMesh(LoadDefaultMesh(), true); // Temporary hack to make it work inside the Blueprint Editor. #if WITH_EDITOR - Owner->SetSkeletalMesh(LoadDefaultMesh(), true); + // FIXME + //Owner->SetSkeletalMesh(LoadDefaultMesh(), true); + // Instead + Owner->SetSkeletalMesh(nullptr, true); #endif /* WITH_EDITOR */ }