add SC cvar settings cache

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
chcurran
2021-09-07 14:32:24 -07:00
parent 64ab627f03
commit 5c0bbe7ac1
5 changed files with 41 additions and 10 deletions
@@ -17,5 +17,23 @@ namespace ScriptCanvas
AZ_CVAR(bool, g_printAbstractCodeModelAtPrefabTime, false, {}, AZ::ConsoleFunctorFlags::Null, "Print out the Abstract Code Model at the end of parsing (at prefab time) for debug purposes.");
AZ_CVAR(bool, g_saveRawTranslationOuputToFile, true, {}, AZ::ConsoleFunctorFlags::Null, "Save out the raw result of translation for debug purposes.");
AZ_CVAR(bool, g_saveRawTranslationOuputToFileAtPrefabTime, false, {}, AZ::ConsoleFunctorFlags::Null, "Save out the raw result of translation (at prefab time) for debug purposes.");
SettingsCache::SettingsCache()
{
m_disableParseOnGraphValidation = g_disableParseOnGraphValidation;
m_printAbstractCodeModel = g_printAbstractCodeModel;
m_printAbstractCodeModelAtPrefabTime = g_printAbstractCodeModelAtPrefabTime;
m_saveRawTranslationOuputToFile = g_saveRawTranslationOuputToFile;
m_saveRawTranslationOuputToFileAtPrefabTime = g_saveRawTranslationOuputToFileAtPrefabTime;
}
SettingsCache::~SettingsCache()
{
g_disableParseOnGraphValidation = m_disableParseOnGraphValidation;
g_printAbstractCodeModel = m_printAbstractCodeModel;
g_printAbstractCodeModelAtPrefabTime = m_printAbstractCodeModelAtPrefabTime;
g_saveRawTranslationOuputToFile = m_saveRawTranslationOuputToFile;
g_saveRawTranslationOuputToFileAtPrefabTime = m_saveRawTranslationOuputToFileAtPrefabTime;
}
}
}
@@ -248,6 +248,22 @@ namespace ScriptCanvas
AZ_CVAR_EXTERNED(bool, g_saveRawTranslationOuputToFile);
AZ_CVAR_EXTERNED(bool, g_saveRawTranslationOuputToFileAtPrefabTime);
class SettingsCache
{
public:
AZ_CLASS_ALLOCATOR(SettingsCache, AZ::SystemAllocator, 0);
SettingsCache();
~SettingsCache();
private:
bool m_disableParseOnGraphValidation;
bool m_printAbstractCodeModel;
bool m_printAbstractCodeModelAtPrefabTime;
bool m_saveRawTranslationOuputToFile;
bool m_saveRawTranslationOuputToFileAtPrefabTime;
};
struct DependencyInfo
{
AZ::Data::AssetId assetId;