Răsfoiți Sursa

Better cache file lookup

Josh Engebretson 10 ani în urmă
părinte
comite
72a8db96ad
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      Source/ToolCore/Assets/AssetDatabase.cpp

+ 3 - 2
Source/ToolCore/Assets/AssetDatabase.cpp

@@ -100,11 +100,12 @@ Asset* AssetDatabase::GetAssetByCachePath(const String& cachePath)
 {
     List<SharedPtr<Asset>>::ConstIterator itr = assets_.Begin();
 
-    String cacheFilename = GetFileName(cachePath);
+    // This is the GUID
+    String cacheFilename = GetFileName(cachePath).ToLower();
 
     while (itr != assets_.End())
     {
-        if ((*itr)->GetCachePath().Contains(cacheFilename))
+        if ((*itr)->GetGUID().ToLower() == cacheFilename)
             return *itr;
 
         itr++;