ScriptCanvasTestingEditorModule.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 <AzCore/Memory/SystemAllocator.h>
  9. #include <AzCore/Module/Module.h>
  10. #include <ScriptCanvasTestingSystemComponent.h>
  11. #include <Editor/Framework/ScriptCanvasTraceUtilities.h>
  12. #include <AutoGen/ScriptCanvasAutoGenRegistry.h>
  13. namespace ScriptCanvasTesting
  14. {
  15. using namespace ScriptCanvasEditor;
  16. class ScriptCanvasTestingModule
  17. : public AZ::Module
  18. {
  19. public:
  20. AZ_RTTI(ScriptCanvasTestingModule, "{AF32BC51-C4E5-48C4-B5E4-D7877C303D43}", AZ::Module);
  21. AZ_CLASS_ALLOCATOR(ScriptCanvasTestingModule, AZ::SystemAllocator);
  22. ScriptCanvasTestingModule()
  23. {
  24. m_descriptors.insert(m_descriptors.end(), {
  25. ScriptCanvasTestingSystemComponent::CreateDescriptor(),
  26. TraceMessageComponent::CreateDescriptor(),
  27. });
  28. ScriptCanvasModel::Instance().Init();
  29. }
  30. /**
  31. * Add required SystemComponents to the SystemEntity.
  32. */
  33. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  34. {
  35. return AZ::ComponentTypeList{
  36. azrtti_typeid<ScriptCanvasTestingSystemComponent>(),
  37. azrtti_typeid<TraceMessageComponent>(),
  38. };
  39. }
  40. };
  41. }
  42. #if defined(O3DE_GEM_NAME)
  43. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Editor), ScriptCanvasTesting::ScriptCanvasTestingModule)
  44. #else
  45. AZ_DECLARE_MODULE_CLASS(Gem_ScriptCanvasTesting_Editor, ScriptCanvasTesting::ScriptCanvasTestingModule)
  46. #endif