AtomBridgeModule.cpp 1.6 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 <AtomBridgeModule.h>
  11. namespace AZ
  12. {
  13. namespace AtomBridge
  14. {
  15. Module::Module()
  16. : AZ::Module()
  17. {
  18. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  19. m_descriptors.insert(m_descriptors.end(), {
  20. FlyCameraInputComponent::CreateDescriptor(),
  21. AtomBridgeSystemComponent::CreateDescriptor(),
  22. });
  23. }
  24. /**
  25. * Add required SystemComponents to the SystemEntity.
  26. */
  27. AZ::ComponentTypeList Module::GetRequiredSystemComponents() const
  28. {
  29. return AZ::ComponentTypeList{
  30. azrtti_typeid<AtomBridgeSystemComponent>(),
  31. };
  32. }
  33. }
  34. } // namespace AZ
  35. #ifndef EDITOR
  36. #if O3DE_HEADLESS_SERVER
  37. #if defined(O3DE_GEM_NAME)
  38. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Headless), AZ::AtomBridge::Module)
  39. #else
  40. AZ_DECLARE_MODULE_CLASS(Gem_Atom_AtomBridge_Headless, AZ::AtomBridge::Module)
  41. #endif
  42. #else
  43. #if defined(O3DE_GEM_NAME)
  44. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), AZ::AtomBridge::Module)
  45. #else
  46. AZ_DECLARE_MODULE_CLASS(Gem_Atom_AtomBridge, AZ::AtomBridge::Module)
  47. #endif
  48. #endif // O3DE_HEADLESS_SERVER
  49. #endif