diff --git a/Nuake/src/Resource/Prefab.cpp b/Nuake/src/Resource/Prefab.cpp index 9932d3c6..66e89aef 100644 --- a/Nuake/src/Resource/Prefab.cpp +++ b/Nuake/src/Resource/Prefab.cpp @@ -16,8 +16,11 @@ namespace Nuake { Ref newPrefab = CreateRef(); newPrefab->Path = path; - std::string prefabTextContent = FileSystem::ReadFile(path); - newPrefab->Deserialize(prefabTextContent); + if (FileSystem::FileExists(path, false)) + { + std::string prefabTextContent = FileSystem::ReadFile(path); + newPrefab->Deserialize(prefabTextContent); + } return newPrefab; }