Interface INetSerializable
Interface for implementing custom data serialization for network transmission.
Namespace: LiteNetLib.Utils
Assembly: LiteNetLib.dll
Syntax
public interface INetSerializable
Remarks
This is the most efficient way to send complex objects as it avoids reflection.
Methods
Deserialize(NetDataReader)
Reads the object data from the provided NetDataReader.
Declaration
void Deserialize(NetDataReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| NetDataReader | reader | The reader to extract data from. |
Serialize(NetDataWriter)
Writes the object data into the provided NetDataWriter.
Declaration
void Serialize(NetDataWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| NetDataWriter | writer | The writer to pack data into. |