ScriptCanvasDeveloperGem.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 <ScriptCanvasDeveloper/ScriptCanvasDeveloperGem.h>
  9. #include <ScriptCanvasDeveloper/ScriptCanvasDeveloperComponent.h>
  10. #include <ScriptCanvasDeveloperEditor/ScriptCanvasDeveloperEditorComponent.h>
  11. #include <ScriptCanvasDeveloperEditor/Developer.h>
  12. namespace ScriptCanvas::Developer
  13. {
  14. ////////////////////////////////////////////////////////////////////////////
  15. // ScriptCanvasDeveloperModule
  16. ////////////////////////////////////////////////////////////////////////////
  17. //! Create ComponentDescriptors and add them to the list.
  18. //! The descriptors will be registered at the appropriate time.
  19. //! The descriptors will be destroyed (and thus unregistered) at the appropriate time.
  20. ScriptCanvasDeveloperModule::ScriptCanvasDeveloperModule()
  21. : AZ::Module()
  22. {
  23. m_descriptors.insert(m_descriptors.end(), {
  24. ScriptCanvas::Developer::SystemComponent::CreateDescriptor(),
  25. ScriptCanvasDeveloperEditor::SystemComponent::CreateDescriptor()
  26. });
  27. AZStd::vector<AZ::ComponentDescriptor*> componentDescriptors(ScriptCanvas::Developer::GetComponentDescriptors());
  28. m_descriptors.insert(m_descriptors.end(), componentDescriptors.begin(), componentDescriptors.end());
  29. }
  30. ScriptCanvasDeveloperModule::~ScriptCanvasDeveloperModule()
  31. {
  32. }
  33. AZ::ComponentTypeList ScriptCanvasDeveloperModule::GetRequiredSystemComponents() const
  34. {
  35. AZ::ComponentTypeList components;
  36. components.insert(components.end(), std::initializer_list<AZ::Uuid> {
  37. azrtti_typeid<ScriptCanvas::Developer::SystemComponent>(),
  38. azrtti_typeid<ScriptCanvasDeveloperEditor::SystemComponent>()
  39. });
  40. return components;
  41. }
  42. }
  43. #if defined(O3DE_GEM_NAME)
  44. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Editor), ScriptCanvas::Developer::ScriptCanvasDeveloperModule)
  45. #else
  46. AZ_DECLARE_MODULE_CLASS(Gem_ScriptCanvasDeveloper_Editor, ScriptCanvas::Developer::ScriptCanvasDeveloperModule)
  47. #endif