MultiplayerToolsSystemComponent.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 <MultiplayerToolsSystemComponent.h>
  9. #include <Pipeline/NetworkPrefabProcessor.h>
  10. #include <AzCore/Serialization/Json/RegistrationContext.h>
  11. #include <Prefab/Instance/InstanceSerializer.h>
  12. namespace Multiplayer
  13. {
  14. void MultiplayerToolsSystemComponent::Reflect(AZ::ReflectContext* context)
  15. {
  16. if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
  17. {
  18. serialize->Class<MultiplayerToolsSystemComponent, AZ::Component>()
  19. ->Version(0);
  20. }
  21. NetworkPrefabProcessor::Reflect(context);
  22. }
  23. void MultiplayerToolsSystemComponent::Activate()
  24. {
  25. AZ::Interface<IMultiplayerTools>::Register(this);
  26. }
  27. void MultiplayerToolsSystemComponent::Deactivate()
  28. {
  29. AZ::Interface<IMultiplayerTools>::Unregister(this);
  30. }
  31. bool MultiplayerToolsSystemComponent::DidProcessNetworkPrefabs()
  32. {
  33. return m_didProcessNetPrefabs;
  34. }
  35. void MultiplayerToolsSystemComponent::SetDidProcessNetworkPrefabs(bool didProcessNetPrefabs)
  36. {
  37. m_didProcessNetPrefabs = didProcessNetPrefabs;
  38. }
  39. } // namespace Multiplayer