MaterialComponent.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #pragma once
  9. #include <Material/MaterialComponentController.h>
  10. #include <AtomLyIntegration/CommonFeatures/Material/MaterialComponentConstants.h>
  11. #include <AzFramework/Components/ComponentAdapter.h>
  12. namespace AZ
  13. {
  14. namespace Render
  15. {
  16. //! Can be paired with renderable components (MeshComponent for example)
  17. //! to provide material overrides on a per-entity basis.
  18. class MaterialComponent final
  19. : public AzFramework::Components::ComponentAdapter<MaterialComponentController, MaterialComponentConfig>
  20. {
  21. public:
  22. using BaseClass = AzFramework::Components::ComponentAdapter<MaterialComponentController, MaterialComponentConfig>;
  23. AZ_COMPONENT(MaterialComponent, MaterialComponentTypeId, BaseClass);
  24. MaterialComponent() = default;
  25. MaterialComponent(const MaterialComponentConfig& config);
  26. static void Reflect(AZ::ReflectContext* context);
  27. };
  28. } // namespace Render
  29. } // namespace AZ