HDRiSkyboxComponent.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 <SkyBox/HDRiSkyboxComponent.h>
  9. #include <AzCore/RTTI/BehaviorContext.h>
  10. namespace AZ
  11. {
  12. namespace Render
  13. {
  14. HDRiSkyboxComponent::HDRiSkyboxComponent(const HDRiSkyboxComponentConfig& config)
  15. : BaseClass(config)
  16. {
  17. }
  18. void HDRiSkyboxComponent::Reflect(AZ::ReflectContext* context)
  19. {
  20. BaseClass::Reflect(context);
  21. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  22. {
  23. serializeContext->Class<HDRiSkyboxComponent, BaseClass>();
  24. }
  25. if (auto behaviorContext = azrtti_cast<BehaviorContext*>(context))
  26. {
  27. behaviorContext->Class<HDRiSkyboxComponent>()->RequestBus("HDRiSkyboxRequestBus");
  28. behaviorContext->ConstantProperty("HDRiSkyboxComponentTypeId", BehaviorConstant(Uuid(HDRiSkyboxComponentTypeId)))
  29. ->Attribute(AZ::Script::Attributes::Module, "render")
  30. ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common);
  31. }
  32. }
  33. } // namespace Render
  34. } // namespace AZ