EditorSystemComponent.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 <Editor/EditorSystemComponent.h>
  9. #include <EMStudio/AtomRenderPlugin.h>
  10. #include <EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioManager.h>
  11. namespace AZ::EMotionFXAtom
  12. {
  13. void EditorSystemComponent::Reflect(ReflectContext* context)
  14. {
  15. if (SerializeContext* serialize = azrtti_cast<SerializeContext*>(context))
  16. {
  17. serialize->Class<EditorSystemComponent, Component>()->Version(0);
  18. }
  19. }
  20. void EditorSystemComponent::Activate()
  21. {
  22. EMotionFX::Integration::SystemNotificationBus::Handler::BusConnect();
  23. }
  24. void EditorSystemComponent::Deactivate()
  25. {
  26. EMotionFX::Integration::SystemNotificationBus::Handler::BusDisconnect();
  27. }
  28. void EditorSystemComponent::OnRegisterPlugin()
  29. {
  30. EMStudio::PluginManager* pluginManager = EMStudio::EMStudioManager::GetInstance()->GetPluginManager();
  31. pluginManager->RegisterPlugin(aznew EMStudio::AtomRenderPlugin());
  32. }
  33. } // namespace AZ::EMotionFXAtom