Photon Fusion 2.1.1

NetBitBufferSerializer Struct Reference

Represents a serializer for reading and writing data to a NetBitBuffer. More...

Public Member Functions

bool Check (bool value)
 Checks the boolean value and writes or reads it from the buffer based on the serializer mode.
void Serialize (ref bool value)
 Serializes a boolean value by writing or reading it from the buffer based on the serializer mode.
void Serialize (ref byte value)
 Serializes a byte value by writing or reading it from the buffer based on the serializer mode.
void Serialize (ref float value)
 Serializes a float value by writing or reading it from the buffer based on the serializer mode.
void Serialize (ref int value)
 Serializes an integer value by writing or reading it from the buffer based on the serializer mode.
void Serialize (ref string value)
 Serializes a string value by writing or reading it from the buffer based on the serializer mode.
void Serialize (ref uint value)
 Serializes an unsigned integer value by writing or reading it from the buffer based on the serializer mode.
void Serialize (ref ulong value)
 Serializes an unsigned long value by writing or reading it from the buffer based on the serializer mode.

Static Public Member Functions

static NetBitBufferSerializer Reader (NetBitBuffer *buffer)
 Creates a new instance of NetBitBufferSerializer for reading from the buffer.
static NetBitBufferSerializer Writer (NetBitBuffer *buffer)
 Creates a new instance of NetBitBufferSerializer for writing to the buffer.

Properties

readonly NetBitBufferBuffer [get]
 Gets the buffer associated with the serializer.
readonly bool Reading [get]
 Gets a value indicating whether the serializer is in read mode.
readonly bool Writing [get]
 Gets a value indicating whether the serializer is in write mode.

Detailed Description

Represents a serializer for reading and writing data to a NetBitBuffer.

Member Function Documentation

◆ Check()

bool Check ( bool value)

Checks the boolean value and writes or reads it from the buffer based on the serializer mode.

Parameters
valueThe boolean value to check.
Returns
The boolean value read from the buffer if in read mode, otherwise the value written to the buffer.

◆ Reader()

NetBitBufferSerializer Reader ( NetBitBuffer * buffer)
static

Creates a new instance of NetBitBufferSerializer for reading from the buffer.

Parameters
bufferThe buffer to read from.
Returns
A new instance of NetBitBufferSerializer configured for reading.

◆ Serialize() [1/7]

void Serialize ( ref bool value)

Serializes a boolean value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe boolean value to serialize.

◆ Serialize() [2/7]

void Serialize ( ref byte value)

Serializes a byte value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe byte value to serialize.

◆ Serialize() [3/7]

void Serialize ( ref float value)

Serializes a float value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe float value to serialize.

◆ Serialize() [4/7]

void Serialize ( ref int value)

Serializes an integer value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe integer value to serialize.

◆ Serialize() [5/7]

void Serialize ( ref string value)

Serializes a string value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe string value to serialize.

◆ Serialize() [6/7]

void Serialize ( ref uint value)

Serializes an unsigned integer value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe unsigned integer value to serialize.

◆ Serialize() [7/7]

void Serialize ( ref ulong value)

Serializes an unsigned long value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe unsigned long value to serialize.

◆ Writer()

NetBitBufferSerializer Writer ( NetBitBuffer * buffer)
static

Creates a new instance of NetBitBufferSerializer for writing to the buffer.

Parameters
bufferThe buffer to write to.
Returns
A new instance of NetBitBufferSerializer configured for writing.