PrefabTestComponent.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. #pragma once
  9. #include <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
  10. namespace UnitTest
  11. {
  12. class PrefabTestComponent
  13. : public AzToolsFramework::Components::EditorComponentBase
  14. {
  15. public:
  16. AZ_EDITOR_COMPONENT(PrefabTestComponent, "{C5FCF40A-FAEC-473C-BFAF-68A66DC45B33}");
  17. PrefabTestComponent() = default;
  18. explicit PrefabTestComponent(bool boolProperty);
  19. static void Reflect(AZ::ReflectContext* reflection);
  20. bool m_boolProperty = false;
  21. int m_intProperty = 0;
  22. AZ::EntityId m_entityIdProperty;
  23. };
  24. class UnReflectedType
  25. {
  26. public:
  27. AZ_TYPE_INFO(UnReflectedType, "{FB65262C-CE9A-45CA-99EB-4DDCB19B32DB}");
  28. int m_unReflectedInt = 42;
  29. };
  30. class PrefabTestComponentWithUnReflectedTypeMember
  31. : public AzToolsFramework::Components::EditorComponentBase
  32. {
  33. public:
  34. AZ_EDITOR_COMPONENT(PrefabTestComponentWithUnReflectedTypeMember, "{726281E1-8E47-46AB-8018-D3F4BA823D74}");
  35. static void Reflect(AZ::ReflectContext* reflection);
  36. UnReflectedType m_unReflectedType;
  37. int m_reflectedType = 52;
  38. };
  39. class PrefabNonEditorComponent : public AZ::Component
  40. {
  41. public:
  42. AZ_COMPONENT(PrefabNonEditorComponent, "{47475C6F-3E69-493F-9EDA-B16E672BEF25}");
  43. PrefabNonEditorComponent() = default;
  44. static void Reflect(AZ::ReflectContext* reflection);
  45. void Activate() override;
  46. void Deactivate() override;
  47. int m_intProperty = 0;
  48. };
  49. }