RenderDebugComponent.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <AzCore/RTTI/BehaviorContext.h>
  9. #include <Debug/RenderDebugComponent.h>
  10. namespace AZ::Render
  11. {
  12. RenderDebugComponent::RenderDebugComponent(const RenderDebugComponentConfig& config)
  13. : BaseClass(config)
  14. {
  15. }
  16. void RenderDebugComponent::Reflect(AZ::ReflectContext* context)
  17. {
  18. BaseClass::Reflect(context);
  19. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  20. {
  21. serializeContext->Class<RenderDebugComponent, BaseClass>();
  22. }
  23. if (auto behaviorContext = azrtti_cast<BehaviorContext*>(context))
  24. {
  25. behaviorContext->Class<RenderDebugComponent>()->RequestBus("RenderDebugRequestBus");
  26. behaviorContext->ConstantProperty("RenderDebugComponentTypeId", BehaviorConstant(Uuid(RenderDebug::RenderDebugComponentTypeId)))
  27. ->Attribute(AZ::Script::Attributes::Module, "render")
  28. ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common);
  29. }
  30. }
  31. }