// Copyright (c) Wojciech Figat. All rights reserved. #pragma once #include "Engine/Core/Compiler.h" #include "Engine/Core/Config.h" class NetworkStream; /// /// Interface for values and objects that can be serialized/deserialized for network replication. /// API_INTERFACE(Namespace="FlaxEngine.Networking") class FLAXENGINE_API INetworkSerializable { DECLARE_SCRIPTING_TYPE_MINIMAL(INetworkSerializable); public: /// /// Serializes object to the output stream. /// /// The output stream to write serialized data. API_FUNCTION() virtual void Serialize(NetworkStream* stream) = 0; /// /// Deserializes object from the input stream. /// /// The input stream to read serialized data. API_FUNCTION() virtual void Deserialize(NetworkStream* stream) = 0; };