add a complementary internal method to IsUsingUserMesh, IsUsingDefaultMesh for checking various hand meshes
This commit is contained in:
@@ -114,6 +114,7 @@ struct USGVirtualHandComponent::FImpl
|
|||||||
bool IsEditor() const;
|
bool IsEditor() const;
|
||||||
|
|
||||||
FString GetDefaultMeshPath() const;
|
FString GetDefaultMeshPath() const;
|
||||||
|
bool IsUsingDefaultMesh() const;
|
||||||
bool IsUsingUserMesh() const;
|
bool IsUsingUserMesh() const;
|
||||||
USkeletalMesh* LoadDefaultMesh() const;
|
USkeletalMesh* LoadDefaultMesh() const;
|
||||||
void SetDefaultMesh() const;
|
void SetDefaultMesh() const;
|
||||||
@@ -514,6 +515,30 @@ FString USGVirtualHandComponent::FImpl::GetDefaultMeshPath() const
|
|||||||
return MoveTemp(SkeletalMeshPath);
|
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
|
bool USGVirtualHandComponent::FImpl::IsUsingUserMesh() const
|
||||||
{
|
{
|
||||||
const USkeletalMesh* CurrentMesh{GetMesh()};
|
const USkeletalMesh* CurrentMesh{GetMesh()};
|
||||||
|
|||||||
Reference in New Issue
Block a user