Network objects replication impl progress

This commit is contained in:
Wojciech Figat
2022-09-14 14:54:32 +02:00
parent 9a19717556
commit 3347887432
11 changed files with 805 additions and 15 deletions

View File

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