EditorTerrainSystemComponent.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 <EditorComponents/EditorTerrainSystemComponent.h>
  10. #include <TerrainRenderer/EditorComponents/EditorTerrainMacroMaterialComponent.h>
  11. namespace Terrain
  12. {
  13. void EditorTerrainSystemComponent::Reflect(AZ::ReflectContext* context)
  14. {
  15. GradientSignal::ImageCreatorUtils::
  16. PaintableImageAssetHelper<EditorTerrainMacroMaterialComponent, EditorTerrainMacroMaterialComponentMode>::Reflect(context);
  17. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  18. {
  19. serializeContext->Class<EditorTerrainSystemComponent, AZ::Component>()->Version(1);
  20. }
  21. }
  22. void EditorTerrainSystemComponent::Activate()
  23. {
  24. AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
  25. }
  26. void EditorTerrainSystemComponent::Deactivate()
  27. {
  28. AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
  29. }
  30. } // namespace Terrain