Josh Engebretson 10 лет назад
Родитель
Сommit
8dc83c2db1
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      Source/ToolCore/Assets/AssetDatabase.cpp

+ 5 - 0
Source/ToolCore/Assets/AssetDatabase.cpp

@@ -400,6 +400,11 @@ void AssetDatabase::HandleProjectLoaded(StringHash eventType, VariantMap& eventD
 {
     project_ = GetSubsystem<ToolSystem>()->GetProject();
 
+    FileSystem* fs = GetSubsystem<FileSystem>();
+
+    if (!fs->DirExists(GetCachePath()))
+        fs->CreateDir(GetCachePath());
+
     ResourceCache* cache = GetSubsystem<ResourceCache>();
     cache->AddResourceDir(GetCachePath());