Provides low level accesss to data buffers that can be read using a NetworkBehaviour.Reader More...
Public Member Functions | |
float | Read (NetworkBehaviour.PropertyReader< float > reader) |
Reads a float property from the buffer using the provided PropertyReader. More... | |
Quaternion | Read (NetworkBehaviour.PropertyReader< Quaternion > reader) |
Reads a Quaternion property from the buffer using the provided PropertyReader. More... | |
Vector2 | Read (NetworkBehaviour.PropertyReader< Vector2 > reader) |
Reads a Vector2 property from the buffer using the provided PropertyReader. More... | |
Vector3 | Read (NetworkBehaviour.PropertyReader< Vector3 > reader) |
Reads a Vector3 property from the buffer using the provided PropertyReader. More... | |
Vector4 | Read (NetworkBehaviour.PropertyReader< Vector4 > reader) |
Reads a Vector4 property from the buffer using the provided PropertyReader. More... | |
T | Read< T > (NetworkBehaviour.BehaviourReader< T > reader) |
Reads a NetworkBehaviour from the buffer using the provided BehaviourReader. More... | |
T | Read< T > (NetworkBehaviour.PropertyReader< T > reader) |
Reads a property from the buffer using the provided PropertyReader. More... | |
unsafe T | ReinterpretState< T > (int offset=0) |
Reinterprets the state of the buffer at a given offset as a specific type. More... | |
Static Public Member Functions | |
static implicit | operator bool (NetworkBehaviourBuffer buffer) |
Implicit conversion operator to bool. This allows a NetworkBehaviourBuffer instance to be used in conditions directly. More... | |
Properties | |
int | Length [get] |
Gets the length of the buffer. More... | |
int | this[int index] [get] |
Indexer to get the value at a specific index in the buffer. More... | |
Tick | Tick [get] |
Gets the tick at which the buffer was created. More... | |
bool | Valid [get] |
Gets a value indicating whether the buffer is valid. A buffer is considered valid if the pointer to the start of the buffer is not null and the length of the buffer is greater than 0. More... | |
Provides low level accesss to data buffers that can be read using a NetworkBehaviour.Reader
|
static |
Implicit conversion operator to bool. This allows a NetworkBehaviourBuffer instance to be used in conditions directly.
buffer | The NetworkBehaviourBuffer instance to convert. |
float Read | ( | NetworkBehaviour.PropertyReader< float > | reader | ) |
Reads a float property from the buffer using the provided PropertyReader.
reader | The PropertyReader to use for reading the float property. |
Quaternion Read | ( | NetworkBehaviour.PropertyReader< Quaternion > | reader | ) |
Reads a Quaternion property from the buffer using the provided PropertyReader.
reader | The PropertyReader to use for reading the Quaternion property. |
Vector2 Read | ( | NetworkBehaviour.PropertyReader< Vector2 > | reader | ) |
Reads a Vector2 property from the buffer using the provided PropertyReader.
reader | The PropertyReader to use for reading the Vector2 property. |
Vector3 Read | ( | NetworkBehaviour.PropertyReader< Vector3 > | reader | ) |
Reads a Vector3 property from the buffer using the provided PropertyReader.
reader | The PropertyReader to use for reading the Vector3 property. |
Vector4 Read | ( | NetworkBehaviour.PropertyReader< Vector4 > | reader | ) |
Reads a Vector4 property from the buffer using the provided PropertyReader.
reader | The PropertyReader to use for reading the Vector4 property. |
T Read< T > | ( | NetworkBehaviour.BehaviourReader< T > | reader | ) |
Reads a NetworkBehaviour from the buffer using the provided BehaviourReader.
T | The type of NetworkBehaviour to read. Must be a subclass of NetworkBehaviour. |
reader | The BehaviourReader to use for reading the NetworkBehaviour. |
T | : | NetworkBehaviour |
T Read< T > | ( | NetworkBehaviour.PropertyReader< T > | reader | ) |
Reads a property from the buffer using the provided PropertyReader.
T | The type of the property to read. Must be unmanaged. |
reader | The PropertyReader to use for reading the property. |
T | : | unmanaged |
unsafe T ReinterpretState< T > | ( | int | offset = 0 | ) |
Reinterprets the state of the buffer at a given offset as a specific type.
T | The type to reinterpret the state as. Must be unmanaged. |
offset | The offset at which to start reinterpreting. Defaults to 0. |
T | : | unmanaged |
|
get |
Gets the length of the buffer.
|
get |
Indexer to get the value at a specific index in the buffer.
index | The index to get the value from. |
|
get |
Gets a value indicating whether the buffer is valid. A buffer is considered valid if the pointer to the start of the buffer is not null and the length of the buffer is greater than 0.