diff --git a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp index 89ad6fc5..977fb862 100644 --- a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp +++ b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp @@ -114,6 +114,7 @@ struct USGVirtualHandComponent::FImpl bool IsEditor() const; FString GetDefaultMeshPath() const; + bool IsUsingDefaultMesh() const; bool IsUsingUserMesh() const; USkeletalMesh* LoadDefaultMesh() const; void SetDefaultMesh() const; @@ -514,6 +515,30 @@ FString USGVirtualHandComponent::FImpl::GetDefaultMeshPath() const return MoveTemp(SkeletalMeshPath); } +bool USGVirtualHandComponent::FImpl::IsUsingDefaultMesh() const +{ + const USkeletalMesh* CurrentMesh{GetMesh()}; + if (!IsValid(CurrentMesh)) + { + return false; + } + + const FString CurrentMeshPath(CurrentMesh->GetPathName()); + const FString LeftHandDefaultMeshPath(GetDefaultLeftHandMeshPath()); + const FString LeftHandDefaultMeshPathOnly(GetDefaultLeftHandMeshPathOnly()); + const FString RightHandDefaultMeshPath(GetDefaultRightHandMeshPath()); + const FString RightHandDefaultMeshPathOnly(GetDefaultRightHandMeshPathOnly()); + if (CurrentMeshPath == LeftHandDefaultMeshPath + || CurrentMeshPath == LeftHandDefaultMeshPathOnly + || CurrentMeshPath == RightHandDefaultMeshPath + || CurrentMeshPath == RightHandDefaultMeshPathOnly) + { + return true; + } + + return false; +} + bool USGVirtualHandComponent::FImpl::IsUsingUserMesh() const { const USkeletalMesh* CurrentMesh{GetMesh()};