EditorStarsSystemComponent.cpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 <EditorStarsSystemComponent.h>
  10. #include <AzCore/Serialization/EditContext.h>
  11. namespace AZ::Render
  12. {
  13. void EditorStarsSystemComponent::Reflect(AZ::ReflectContext* context)
  14. {
  15. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  16. {
  17. serializeContext->Class<EditorStarsSystemComponent, StarsSystemComponent>()
  18. ->Version(0);
  19. if (AZ::EditContext* ec = serializeContext->GetEditContext())
  20. {
  21. ec->Class<StarsSystemComponent>("Stars", "Stars system component")
  22. ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  23. ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System"))
  24. ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
  25. ;
  26. }
  27. }
  28. }
  29. void EditorStarsSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  30. {
  31. BaseSystemComponent::GetProvidedServices(provided);
  32. provided.push_back(AZ_CRC_CE("EditorStarsService"));
  33. }
  34. void EditorStarsSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  35. {
  36. BaseSystemComponent::GetIncompatibleServices(incompatible);
  37. incompatible.push_back(AZ_CRC_CE("EditorStarsService"));
  38. }
  39. } // namespace Stars