3
0

MeshletsEditorModule.cpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. AZ_DECLARE_MODULE_CLASS(Gem_Meshlets, AZ::Meshlets::MeshletsEditorModule)