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:
daimini
2021-04-27 17:21:33 -07:00
parent c07a7c3766
commit b758a1553f
@@ -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())
{