3
0

DccScriptingInterfaceEditorSystemComponent.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 "DccScriptingInterfaceEditorSystemComponent.h"
  10. namespace DccScriptingInterface
  11. {
  12. void DccScriptingInterfaceEditorSystemComponent::Reflect(AZ::ReflectContext* context)
  13. {
  14. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  15. {
  16. serializeContext->Class<DccScriptingInterfaceEditorSystemComponent, AZ::Component>();
  17. }
  18. }
  19. DccScriptingInterfaceEditorSystemComponent::DccScriptingInterfaceEditorSystemComponent()
  20. {
  21. if (DccScriptingInterfaceInterface::Get() == nullptr)
  22. {
  23. DccScriptingInterfaceInterface::Register(this);
  24. }
  25. }
  26. DccScriptingInterfaceEditorSystemComponent::~DccScriptingInterfaceEditorSystemComponent()
  27. {
  28. if (DccScriptingInterfaceInterface::Get() == this)
  29. {
  30. DccScriptingInterfaceInterface::Unregister(this);
  31. }
  32. }
  33. void DccScriptingInterfaceEditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  34. {
  35. provided.push_back(AZ_CRC_CE("DccScriptingInterfaceEditorService"));
  36. }
  37. void DccScriptingInterfaceEditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  38. {
  39. incompatible.push_back(AZ_CRC_CE("DccScriptingInterfaceEditorService"));
  40. }
  41. void DccScriptingInterfaceEditorSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
  42. {
  43. }
  44. void DccScriptingInterfaceEditorSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
  45. {
  46. }
  47. void DccScriptingInterfaceEditorSystemComponent::Activate()
  48. {
  49. DccScriptingInterfaceRequestBus::Handler::BusConnect();
  50. }
  51. void DccScriptingInterfaceEditorSystemComponent::Deactivate()
  52. {
  53. DccScriptingInterfaceRequestBus::Handler::BusDisconnect();
  54. }
  55. } // namespace DccScriptingInterface