RecastNavigationModuleInterface.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 <RecastNavigationSystemComponent.h>
  9. #include <AzCore/Memory/SystemAllocator.h>
  10. #include <AzCore/Module/Module.h>
  11. #include <Components/DetourNavigationComponent.h>
  12. #include <Components/RecastNavigationMeshComponent.h>
  13. #include <Components/RecastNavigationPhysXProviderComponent.h>
  14. namespace RecastNavigation
  15. {
  16. class RecastNavigationModuleInterface
  17. : public AZ::Module
  18. {
  19. public:
  20. AZ_RTTI(RecastNavigationModuleInterface, "{d1f30353-6d97-4392-b367-a82587ce439c}", AZ::Module);
  21. AZ_CLASS_ALLOCATOR(RecastNavigationModuleInterface, AZ::SystemAllocator);
  22. RecastNavigationModuleInterface()
  23. {
  24. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  25. // Add ALL components descriptors associated with this gem to m_descriptors.
  26. // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext.
  27. // This happens through the [MyComponent]::Reflect() function.
  28. m_descriptors.insert(m_descriptors.end(), {
  29. RecastNavigationSystemComponent::CreateDescriptor(),
  30. DetourNavigationComponent::CreateDescriptor(),
  31. RecastNavigationMeshComponent::CreateDescriptor(),
  32. RecastNavigationPhysXProviderComponent::CreateDescriptor(),
  33. });
  34. }
  35. //! Add required SystemComponents to the SystemEntity.
  36. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  37. {
  38. return AZ::ComponentTypeList{
  39. azrtti_typeid<RecastNavigationSystemComponent>(),
  40. };
  41. }
  42. };
  43. }// namespace RecastNavigation