Gems/Umbra/Code/Source/UmbraSystemComponent/UmbraSystemComponentConfig.cpp (34 lines of code) (raw):
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*/
#include <AzCore/RTTI/BehaviorContext.h>
#include <AzCore/Serialization/EditContext.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <Umbra/UmbraSystemComponent/UmbraSystemComponentConfig.h>
namespace Umbra
{
void UmbraSystemComponentConfig::Reflect(AZ::ReflectContext* context)
{
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
{
serializeContext->Class<UmbraSystemComponentConfig, AZ::ComponentConfig>()
->Version(0)
;
if (auto editContext = serializeContext->GetEditContext())
{
editContext->Class<UmbraSystemComponentConfig>("UmbraSystemComponentConfig", "")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::Show)
;
}
}
if (auto behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
{
behaviorContext->Class<UmbraSystemComponentConfig>("UmbraSystemComponentConfig")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
->Attribute(AZ::Script::Attributes::Category, "Umbra")
->Attribute(AZ::Script::Attributes::Module, "umbra")
->Constructor()
->Constructor<const UmbraSystemComponentConfig&>()
;
}
}
} // namespace Umbra