Merge pull request #1296 from aws-lumberyard-dev/Atom/dmcdiar/LYN-4346

[LYN-4346] Adding the Diffuse Global Illumination component crashes the Editor (Prefab Mode)
This commit is contained in:
dmcdiarmid-ly
2021-06-14 10:18:13 -07:00
committed by GitHub
4 changed files with 11 additions and 3 deletions
@@ -23,7 +23,9 @@ namespace AZ
{
Low,
Medium,
High
High,
Count
};
//! This class provides general features and configuration for the diffuse global illumination environment,
@@ -43,6 +43,12 @@ namespace AZ
void DiffuseGlobalIlluminationFeatureProcessor::SetQualityLevel(DiffuseGlobalIlluminationQualityLevel qualityLevel)
{
if (qualityLevel >= DiffuseGlobalIlluminationQualityLevel::Count)
{
AZ_Assert(false, "SetQualityLevel called with invalid quality level [%d]", qualityLevel);
return;
}
m_qualityLevel = qualityLevel;
UpdatePasses();
@@ -29,7 +29,7 @@ namespace AZ
static void Reflect(ReflectContext* context);
DiffuseGlobalIlluminationQualityLevel m_qualityLevel;
DiffuseGlobalIlluminationQualityLevel m_qualityLevel = DiffuseGlobalIlluminationQualityLevel::Low;
};
}
}
@@ -36,7 +36,7 @@ namespace AZ
->Attribute(Edit::Attributes::Category, "Atom")
->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/Component_Placeholder.svg")
->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/Component_Placeholder.png")
->Attribute(Edit::Attributes::AppearsInAddComponentMenu, AZStd::vector<AZ::Crc32>({ AZ_CRC("Level", 0x9aeacc13), AZ_CRC("Game", 0x232b318c) }))
->Attribute(Edit::Attributes::AppearsInAddComponentMenu, AZStd::vector<AZ::Crc32>({ AZ_CRC("Level", 0x9aeacc13) }))
->Attribute(Edit::Attributes::AutoExpand, true)
->Attribute(Edit::Attributes::HelpPageURL, "https://")
;