MeshletsEditorModule.cpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Modifications 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 <MeshletsModuleInterface.h>
  9. #include <MeshletsEditorSystemComponent.h>
  10. namespace AZ
  11. {
  12. namespace Meshlets
  13. {
  14. class MeshletsEditorModule
  15. : public MeshletsModuleInterface
  16. {
  17. public:
  18. AZ_RTTI(MeshletsEditorModule, "{19bbf909-a4fc-48ec-915a-316046feb2f9}", MeshletsModuleInterface);
  19. AZ_CLASS_ALLOCATOR(MeshletsEditorModule, AZ::SystemAllocator);
  20. MeshletsEditorModule()
  21. {
  22. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  23. // Add ALL components descriptors associated with this gem to m_descriptors.
  24. // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext.
  25. // This happens through the [MyComponent]::Reflect() function.
  26. m_descriptors.insert(m_descriptors.end(), {
  27. MeshletsEditorSystemComponent::CreateDescriptor(),
  28. });
  29. }
  30. /**
  31. * Add required SystemComponents to the SystemEntity.
  32. * Non-SystemComponents should not be added here
  33. */
  34. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  35. {
  36. return AZ::ComponentTypeList {
  37. azrtti_typeid<MeshletsEditorSystemComponent>(),
  38. };
  39. }
  40. };
  41. } // namespace Meshlets
  42. } // namespace AZ
  43. #if defined(O3DE_GEM_NAME)
  44. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Editor), AZ::Meshlets::MeshletsEditorModule)
  45. #else
  46. AZ_DECLARE_MODULE_CLASS(Gem_Meshlets_Editor, AZ::Meshlets::MeshletsEditorModule)
  47. #endif