Added MaterialPropertyId::GetStringView() utility function.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
This commit is contained in:
santorac
2022-01-12 15:32:49 -08:00
parent 8d5a53ab93
commit 534843df0f
2 changed files with 11 additions and 0 deletions
@@ -41,8 +41,14 @@ namespace AZ
operator const Name&() const;
//! Returns a pointer to the full name ("[groupName].[propertyName]").
//! Same as Name::GetCStr()
//! This is included for convenience so it can be used for error messages in the same way an AZ::Name is used.
const char* GetCStr() const;
//! Returns a string_view of the full name ("[groupName].[propertyName]").
//! Same as Name::GetStringView()
//! This is included for convenience so it can be used for string comparison in the same way an AZ::Name is used.
AZStd::string_view GetStringView() const;
//! Returns a hash of the full name. This is needed for compatibility with NameIdReflectionMap.
Name::Hash GetHash() const;
@@ -111,6 +111,11 @@ namespace AZ
{
return m_fullName.GetCStr();
}
AZStd::string_view MaterialPropertyId::GetStringView() const
{
return m_fullName.GetStringView();
}
Name::Hash MaterialPropertyId::GetHash() const
{