MachineLearningEditorModule.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include <MachineLearning/MachineLearningTypeIds.h>
  2. #include <MachineLearningModuleInterface.h>
  3. #include "MachineLearningEditorSystemComponent.h"
  4. namespace MachineLearning
  5. {
  6. class MachineLearningEditorModule
  7. : public MachineLearningModuleInterface
  8. {
  9. public:
  10. AZ_RTTI(MachineLearningEditorModule, MachineLearningEditorModuleTypeId, MachineLearningModuleInterface);
  11. AZ_CLASS_ALLOCATOR(MachineLearningEditorModule, AZ::SystemAllocator);
  12. MachineLearningEditorModule()
  13. {
  14. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  15. // Add ALL components descriptors associated with this gem to m_descriptors.
  16. // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext.
  17. // This happens through the [MyComponent]::Reflect() function.
  18. m_descriptors.insert(m_descriptors.end(), {
  19. MachineLearningEditorSystemComponent::CreateDescriptor(),
  20. });
  21. }
  22. /**
  23. * Add required SystemComponents to the SystemEntity.
  24. * Non-SystemComponents should not be added here
  25. */
  26. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  27. {
  28. return AZ::ComponentTypeList {
  29. azrtti_typeid<MachineLearningEditorSystemComponent>(),
  30. };
  31. }
  32. };
  33. }// namespace MachineLearning
  34. AZ_DECLARE_MODULE_CLASS(Gem_MachineLearning, MachineLearning::MachineLearningEditorModule)