3
0

RecastNavigationEditorModule.cpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 <RecastNavigationModuleInterface.h>
  9. #include <RecastNavigationEditorSystemComponent.h>
  10. #include <EditorComponents/EditorDetourNavigationComponent.h>
  11. #include <EditorComponents/EditorRecastNavigationMeshComponent.h>
  12. #include <EditorComponents/EditorRecastNavigationPhysXProviderComponent.h>
  13. namespace RecastNavigation
  14. {
  15. class RecastNavigationEditorModule
  16. : public RecastNavigationModuleInterface
  17. {
  18. public:
  19. AZ_RTTI(RecastNavigationEditorModule, "{a8fb0082-78ab-4ca6-8f63-68c98f1a6a6d}", RecastNavigationModuleInterface);
  20. AZ_CLASS_ALLOCATOR(RecastNavigationEditorModule, AZ::SystemAllocator);
  21. RecastNavigationEditorModule()
  22. {
  23. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  24. // Add ALL components descriptors associated with this gem to m_descriptors.
  25. // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext.
  26. // This happens through the [MyComponent]::Reflect() function.
  27. m_descriptors.insert(m_descriptors.end(), {
  28. RecastNavigationEditorSystemComponent::CreateDescriptor(),
  29. EditorDetourNavigationComponent::CreateDescriptor(),
  30. EditorRecastNavigationMeshComponent::CreateDescriptor(),
  31. EditorRecastNavigationPhysXProviderComponent::CreateDescriptor(),
  32. });
  33. }
  34. //! Add required SystemComponents to the SystemEntity.
  35. //! Non-SystemComponents should not be added here.
  36. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  37. {
  38. return AZ::ComponentTypeList {
  39. azrtti_typeid<RecastNavigationEditorSystemComponent>(),
  40. };
  41. }
  42. };
  43. }// namespace RecastNavigation
  44. AZ_DECLARE_MODULE_CLASS(Gem_RecastNavigation, RecastNavigation::RecastNavigationEditorModule)