Interface IReaderWriter
Interface for an implementation of one side of a two-way serializer
Namespace: Unity.Netcode
Assembly: solution.dll
Syntax
public interface IReaderWriter
Properties
Name | Description |
---|---|
IsReader | Check whether this implementation is a "reader" - if it's been constructed to deserialize data |
IsWriter | Check whether this implementation is a "writer" - if it's been constructed to serialize data |
Methods
Name | Description |
---|---|
GetFastBufferReader() | Get the underlying FastBufferReader struct. Only valid when IsReader == true |
GetFastBufferWriter() | Get the underlying FastBufferWriter struct. Only valid when IsWriter == true |
PreCheck(int) | Performs an advance check to ensure space is available to read/write one or more values. This provides a performance benefit for serializing multiple values using the SerializeValuePreChecked methods. But note that the benefit is small and only likely to be noticeable if serializing a very large number of items. |
SerializeNetworkSerializable<T>(ref T) | Read or write a NetworkSerializable value. SerializeValue() is the preferred method to do this - this is provided for backward compatibility only. |
SerializeValue(ref byte) | Read or write a single byte |
SerializeValue(ref string, bool) | Read or write a string |
SerializeValue(ref Color32) | Read or write a Color32 value |
SerializeValue(ref Color32[]) | Read or write an array of Color32 values |
SerializeValue(ref Color) | Read or write a Color value |
SerializeValue(ref Color[]) | Read or write an array of Color values |
SerializeValue(ref Quaternion) | Read or write a Quaternion value |
SerializeValue(ref Quaternion[]) | Read or write an array of Quaternion values |
SerializeValue(ref Ray2D) | Read or write a Ray2D value |
SerializeValue(ref Ray2D[]) | Read or write an array of Ray2D values |
SerializeValue(ref Ray) | Read or write a Ray value |
SerializeValue(ref Ray[]) | Read or write an array of Ray values |
SerializeValue(ref Vector2) | Read or write a Vector2 value |
SerializeValue(ref Vector2Int) | Read or write a Vector2Int value |
SerializeValue(ref Vector2Int[]) | Read or write an array of Vector2Int values |
SerializeValue(ref Vector2[]) | Read or write an array of Vector2 values |
SerializeValue(ref Vector3) | Read or write a Vector3 value |
SerializeValue(ref Vector3Int) | Read or write a Vector3Int value |
SerializeValue(ref Vector3Int[]) | Read or write an array of Vector3Int values |
SerializeValue(ref Vector3[]) | Read or write an array of Vector3 values |
SerializeValue(ref Vector4) | Read or write a Vector4 value |
SerializeValue(ref Vector4[]) | Read or write an array of Vector4 values |
SerializeValuePreChecked(ref byte) | Serialize a byte, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref string, bool) | Serialize a string, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Color32) | Serialize a Color32, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Color32[]) | Serialize a Color32 array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Color) | Serialize a Color, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Color[]) | Serialize a Color array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Quaternion) | Serialize a Quaternion, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Quaternion[]) | Serialize a Quaternion array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Ray2D) | Serialize a Ray2D, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Ray2D[]) | Serialize a Ray2D array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Ray) | Serialize a Ray, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Ray[]) | Serialize a Ray array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Vector2) | Serialize a Vector2, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Vector2Int) | Serialize a Vector2Int, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Vector2Int[]) | Serialize a Vector2Int array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Vector2[]) | Serialize a Vector2 array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Vector3) | Serialize a Vector3, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Vector3Int) | Serialize a Vector3Int, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Vector3Int[]) | Serialize a Vector3Int array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Vector3[]) | Serialize a Vector3 array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Vector4) | Serialize a Vector4, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked(ref Vector4[]) | Serialize a Vector4 array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked<T>(ref NativeArray<T>, Allocator, ForGeneric) | Serialize a NativeArray of structs, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked<T>(ref T, ForEnums) | Serialize an enum, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked<T>(ref T, ForFixedStrings) | Serialize a FixedString, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked<T>(ref T, ForPrimitives) | Serialize a primitive, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked<T>(ref T, ForStructs) | Serialize a struct, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked<T>(ref T[], ForEnums) | Serialize an array of enums, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked<T>(ref T[], ForPrimitives) | Serialize an array of primitives, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValuePreChecked<T>(ref T[], ForStructs) | Serialize an array of structs, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior. |
SerializeValue<T>(ref NativeArray<T>, Allocator) | Read or write NativeArray of FixedString values |
SerializeValue<T>(ref NativeArray<T>, Allocator, ForGeneric) | Read or write a NativeArray of struct values implementing ISerializeByMemcpy |
SerializeValue<T>(ref T, ForEnums) | Read or write an enum value |
SerializeValue<T>(ref T, ForFixedStrings) | Read or write a FixedString value |
SerializeValue<T>(ref T, ForNetworkSerializable) | Read or write a struct or class value implementing INetworkSerializable |
SerializeValue<T>(ref T, ForPrimitives) | Read or write a primitive value (int, bool, etc) Accepts any value that implements the given interfaces, but is not guaranteed to work correctly on values that are not primitives. |
SerializeValue<T>(ref T, ForStructs) | Read or write a struct value implementing ISerializeByMemcpy |
SerializeValue<T>(ref T[], ForEnums) | Read or write an array of enum values |
SerializeValue<T>(ref T[], ForNetworkSerializable) | Read or write an array of struct or class values implementing INetworkSerializable |
SerializeValue<T>(ref T[], ForPrimitives) | Read or write an array of primitive values (int, bool, etc) Accepts any value that implements the given interfaces, but is not guaranteed to work correctly on values that are not primitives. |
SerializeValue<T>(ref T[], ForStructs) | Read or write an array of struct values implementing ISerializeByMemcpy |