fix the non-existent default hand-mesh warnings polluting the logs when packaging the game

This commit is contained in:
Mamadou Babaei
2024-09-02 19:38:32 +02:00
parent 89f4be7b96
commit 06bd28d5b1
2 changed files with 23 additions and 10 deletions
+1
View File
@@ -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 `USGHMDTrackerKismetLibrary`.
- Fix the wrong script name for `USGXRTrackerKismetLibrary `. - 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 `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. - Expanded the clickable area on the handbook index page revision buttons.
- Minor documentation fixes. - Minor documentation fixes.
@@ -651,17 +651,26 @@ bool USGVirtualHandComponent::FImpl::IsUsingUserMesh() const
USkeletalMesh* USGVirtualHandComponent::FImpl::LoadDefaultMesh() const USkeletalMesh* USGVirtualHandComponent::FImpl::LoadDefaultMesh() const
{ {
const FString DefaultMeshPath{GetDefaultMeshPath()}; // FIXME
USkeletalMesh* DefaultMesh{ // Disable this warning altogether as it results in polluting the packaging logs, at least until we ship a set of
Cast<USkeletalMesh>(StaticLoadObject(USkeletalMesh::StaticClass(), nullptr, *DefaultMeshPath)) // virtual hand meshes again.
}; // const FString DefaultMeshPath{GetDefaultMeshPath()};
// USkeletalMesh* DefaultMesh{
// Cast<USkeletalMesh>(StaticLoadObject(USkeletalMesh::StaticClass(), nullptr, *DefaultMeshPath))
// };
if (!IsValid(DefaultMesh)) // FIXME
{ // Disable this warning altogether as it results in polluting the packaging logs, at least until we ship a set of
SGLOG_WARNING(FString::Printf(TEXT("Failed to load the default skeletal mesh: '%s'"), *DefaultMeshPath)); // 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 void USGVirtualHandComponent::FImpl::SetDefaultMesh() const
@@ -677,7 +686,10 @@ void USGVirtualHandComponent::FImpl::SetDefaultMesh() const
//Owner->SetSkeletalMesh(LoadDefaultMesh(), true); //Owner->SetSkeletalMesh(LoadDefaultMesh(), true);
// Temporary hack to make it work inside the Blueprint Editor. // Temporary hack to make it work inside the Blueprint Editor.
#if WITH_EDITOR #if WITH_EDITOR
Owner->SetSkeletalMesh(LoadDefaultMesh(), true); // FIXME
//Owner->SetSkeletalMesh(LoadDefaultMesh(), true);
// Instead
Owner->SetSkeletalMesh(nullptr, true);
#endif /* WITH_EDITOR */ #endif /* WITH_EDITOR */
} }