MeshletsEditorSystemComponent.cpp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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/Serialization/SerializeContext.h>
  9. #include <MeshletsEditorSystemComponent.h>
  10. namespace AZ
  11. {
  12. namespace Meshlets
  13. {
  14. void MeshletsEditorSystemComponent::Reflect(AZ::ReflectContext* context)
  15. {
  16. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  17. {
  18. serializeContext->Class<MeshletsEditorSystemComponent, MeshletsSystemComponent>()
  19. ->Version(0);
  20. }
  21. }
  22. MeshletsEditorSystemComponent::MeshletsEditorSystemComponent() = default;
  23. MeshletsEditorSystemComponent::~MeshletsEditorSystemComponent() = default;
  24. void MeshletsEditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  25. {
  26. BaseSystemComponent::GetProvidedServices(provided);
  27. provided.push_back(AZ_CRC_CE("MeshletsEditorService"));
  28. }
  29. void MeshletsEditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  30. {
  31. BaseSystemComponent::GetIncompatibleServices(incompatible);
  32. incompatible.push_back(AZ_CRC_CE("MeshletsEditorService"));
  33. }
  34. void MeshletsEditorSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
  35. {
  36. BaseSystemComponent::GetRequiredServices(required);
  37. }
  38. void MeshletsEditorSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
  39. {
  40. BaseSystemComponent::GetDependentServices(dependent);
  41. }
  42. void MeshletsEditorSystemComponent::Activate()
  43. {
  44. MeshletsSystemComponent::Activate();
  45. AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
  46. }
  47. void MeshletsEditorSystemComponent::Deactivate()
  48. {
  49. AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
  50. MeshletsSystemComponent::Deactivate();
  51. }
  52. } // namespace Meshlets
  53. } // namespace AZ