Integrating latest from github/staging

Integrating up through commit 5e1bdae
This commit is contained in:
alexpete
2021-03-26 14:31:50 -07:00
parent 9c54341af8
commit 36c4e827bd
764 changed files with 11453 additions and 20251 deletions
@@ -14,6 +14,8 @@
#include "AssetDatabaseLocationListener.h"
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
// AzToolsFramework
#include <AzToolsFramework/AssetDatabase/AssetDatabaseConnection.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserBus.h>
@@ -44,16 +46,20 @@ namespace AssetDatabase
return m_assetDatabaseConnection;
}
bool AssetDatabaseLocationListener::GetAssetDatabaseLocation( AZStd::string& result )
bool AssetDatabaseLocationListener::GetAssetDatabaseLocation(AZStd::string& result)
{
result = gEnv->pFileIO->GetAlias( "@devroot@" );
result += "/Cache/";
ICVar * pCvar = gEnv->pConsole->GetCVar( "sys_game_folder" );
if( pCvar && pCvar->GetString() )
if (auto registry = AZ::SettingsRegistry::Get(); registry != nullptr)
{
result += pCvar->GetString();
AZ::SettingsRegistryInterface::FixedValueString projectCacheRootValue;
if (registry->Get(projectCacheRootValue, AZ::SettingsRegistryMergeUtils::FilePathKey_CacheProjectRootFolder);
!projectCacheRootValue.empty())
{
result = projectCacheRootValue;
result += "/assetdb.sqlite";
return true;
}
}
result += "/assetdb.sqlite";
return true;
return false;
}
}//namespace AssetDatabase