GetTemplateIdFromFilePath now asserts if it's passed an absolute path. This is helpful for debugging, since the function would silently fail even if the file was actually loaded.
This commit is contained in:
@@ -720,6 +720,8 @@ namespace AzToolsFramework
|
||||
|
||||
TemplateId PrefabSystemComponent::GetTemplateIdFromFilePath(AZ::IO::PathView filePath) const
|
||||
{
|
||||
AZ_Assert(!filePath.IsAbsolute(), "Prefab - GetTemplateIdFromFilePath was passed an absolute path. Prefabs use paths relative to the project folder.");
|
||||
|
||||
auto found = m_templateFilePathToIdMap.find(filePath);
|
||||
if (found != m_templateFilePathToIdMap.end())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user