Gems/Umbra/Code/Source/UmbraSystemComponent/UmbraSystemComponent.cpp (33 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/SerializeContext.h>
#include <Umbra/UmbraSceneAsset/UmbraObjectDescriptor.h>
#include <Umbra/UmbraSceneAsset/UmbraSceneAsset.h>
#include <UmbraSystemComponent/UmbraSystemComponent.h>
#include <Umbra/UmbraSceneAsset/UmbraSceneSettings.h>
namespace Umbra
{
UmbraSystemComponent::UmbraSystemComponent(const UmbraSystemComponentConfig& config)
: BaseClass(config)
{
}
void UmbraSystemComponent::Reflect(AZ::ReflectContext* context)
{
BaseClass::Reflect(context);
UmbraObjectDescriptor::Reflect(context);
UmbraSceneAsset::Reflect(context);
UmbraSceneSettings::Reflect(context);
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
{
serializeContext->Class<UmbraSystemComponent, BaseClass>()
->Version(0)
;
}
if (auto behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
{
behaviorContext->ConstantProperty("UmbraSystemComponentTypeId", BehaviorConstant(AZ::Uuid(UmbraSystemComponentTypeId)))
->Attribute(AZ::Script::Attributes::Module, "umbra")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
;
}
}
} // namespace Umbra