Просмотр исходного кода

Moving a resource will now properly update it's project library uuid <-> file path mapping

BearishSun 10 лет назад
Родитель
Сommit
2004f71759
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      BansheeEditor/Source/BsProjectLibrary.cpp

+ 9 - 0
BansheeEditor/Source/BsProjectLibrary.cpp

@@ -720,6 +720,15 @@ namespace BansheeEngine
 				{
 					resEntry = static_cast<ResourceEntry*>(oldEntry);
 					removeDependencies(resEntry);
+
+					// Update uuid <-> path mapping
+					if(resEntry->meta != nullptr)
+					{
+						const String& UUID = resEntry->meta->getUUID();
+
+						mUUIDToPath[UUID] = newFullPath;
+						mResourceManifest->registerResource(UUID, newFullPath);
+					}
 				}
 
 				if(FileSystem::isFile(oldMetaPath))