EditorTerrainWorldRendererComponent.cpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 <EditorComponents/EditorTerrainWorldRendererComponent.h>
  9. #include <AzCore/Serialization/SerializeContext.h>
  10. #include <AzCore/Serialization/EditContext.h>
  11. namespace Terrain
  12. {
  13. void EditorTerrainWorldRendererComponent::Reflect(AZ::ReflectContext* context)
  14. {
  15. BaseClassType::Reflect(context);
  16. AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(context);
  17. if (serializeContext)
  18. {
  19. serializeContext->Class<EditorTerrainWorldRendererComponent, BaseClassType>()
  20. ->Version(0)
  21. ;
  22. if (auto editContext = serializeContext->GetEditContext())
  23. {
  24. editContext->Class<EditorTerrainWorldRendererComponent>(
  25. "Terrain World Renderer", "")
  26. ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  27. ->Attribute(AZ::Edit::Attributes::Category, "Terrain")
  28. ->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/TerrainWorldRenderer.svg")
  29. ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://docs.o3de.org/docs/user-guide/components/reference/terrain/world-renderer/")
  30. ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Editor/Icons/Components/Viewport/TerrainWorldRenderer.svg")
  31. ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZStd::vector<AZ::Crc32>({ AZ_CRC_CE("Level") }))
  32. ;
  33. }
  34. }
  35. }
  36. void EditorTerrainWorldRendererComponent::Init()
  37. {
  38. BaseClassType::Init();
  39. }
  40. void EditorTerrainWorldRendererComponent::Activate()
  41. {
  42. BaseClassType::Activate();
  43. }
  44. AZ::u32 EditorTerrainWorldRendererComponent::ConfigurationChanged()
  45. {
  46. return BaseClassType::ConfigurationChanged();
  47. }
  48. }