HairModule.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 <HairModule.h>
  9. #include <Components/HairSystemComponent.h>
  10. #include <Components/HairComponent.h>
  11. #if defined (ATOMTRESSFX_EDITOR)
  12. #include <Components/EditorHairComponent.h>
  13. #endif // ATOMTRESSFX_EDITOR
  14. namespace AZ
  15. {
  16. namespace Render
  17. {
  18. namespace Hair
  19. {
  20. HairModule::HairModule()
  21. : AZ::Module()
  22. {
  23. m_descriptors.insert(
  24. m_descriptors.end(),
  25. {
  26. HairSystemComponent::CreateDescriptor(),
  27. HairComponent::CreateDescriptor(),
  28. #if defined (ATOMTRESSFX_EDITOR)
  29. // Prevent adding editor component when editor and tools are not built
  30. EditorHairComponent::CreateDescriptor(),
  31. #endif // ATOMTRESSFX_EDITOR
  32. });
  33. }
  34. AZ::ComponentTypeList HairModule::GetRequiredSystemComponents() const
  35. {
  36. // add required SystemComponents to the SystemEntity
  37. return AZ::ComponentTypeList{
  38. azrtti_typeid<HairSystemComponent>()
  39. };
  40. }
  41. } // namespace Hair
  42. } // namespace Render
  43. } // namespace AZ