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
+7 -8
View File
@@ -15,10 +15,12 @@
#include <AzCore/base.h>
#include <AzCore/IO/SystemFile.h> // for max path len
#include <ISystem.h>
#include <AzCore/std/string/string.h>
#include <AzCore/Utils/Utils.h>
#include <AzFramework/StringFunc/StringFunc.h>
#include <ISystem.h>
namespace MaterialUtils
{
//! UnifyMaterialName - given a non-unified material name, remove the extension, unify the slashes
@@ -75,14 +77,11 @@ namespace MaterialUtils
static char cachedGameName[AZ_MAX_PATH_LEN] = { 0 };
if (!removals[removalSize - 1])
{
if ((gEnv) && (gEnv->pConsole))
auto projectName = AZ::Utils::GetProjectName();
if (!projectName.empty())
{
ICVar* pGameNameCVar = gEnv->pConsole->GetCVar("sys_game_folder");
if (pGameNameCVar)
{
azstrcpy(cachedGameName, AZ_MAX_PATH_LEN, pGameNameCVar->GetString());
azstrcat(cachedGameName, AZ_MAX_PATH_LEN, "/");
}
azstrcpy(cachedGameName, AZ_MAX_PATH_LEN, projectName.c_str());
azstrcat(cachedGameName, AZ_MAX_PATH_LEN, "/");
}
if (cachedGameName[0] == 0)