Method ReadValue
ReadValue(out string, bool)
Reads a string NOTE: ALLOCATES
Declaration
public void ReadValue(out string s, bool oneByteChars = false)
Parameters
Type | Name | Description |
---|---|---|
string | s | Stores the read string |
bool | oneByteChars | Whether or not to use one byte per character. This will only allow ASCII |
ReadValue<T>(out T, ForNetworkSerializable)
Read a NetworkSerializable value
Declaration
public void ReadValue<T>(out T value, FastBufferWriter.ForNetworkSerializable unused = default) where T : INetworkSerializable, new()
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to read |
FastBufferWriter.ForNetworkSerializable | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
ReadValue<T>(out T[], ForNetworkSerializable)
Read a NetworkSerializable array
Declaration
public void ReadValue<T>(out T[] value, FastBufferWriter.ForNetworkSerializable unused = default) where T : INetworkSerializable, new()
Parameters
Type | Name | Description |
---|---|---|
T[] | value | The values to read |
FastBufferWriter.ForNetworkSerializable | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
ReadValue<T>(out T, ForStructs)
Read a struct
Declaration
public void ReadValue<T>(out T value, FastBufferWriter.ForStructs unused = default) where T : unmanaged, INetworkSerializeByMemcpy
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to read |
FastBufferWriter.ForStructs | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
ReadValue<T>(out T[], ForStructs)
Read a struct array
Declaration
public void ReadValue<T>(out T[] value, FastBufferWriter.ForStructs unused = default) where T : unmanaged, INetworkSerializeByMemcpy
Parameters
Type | Name | Description |
---|---|---|
T[] | value | The values to read |
FastBufferWriter.ForStructs | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
ReadValue<T>(out NativeArray<T>, Allocator, ForGeneric)
Read a struct NativeArray
Declaration
public void ReadValue<T>(out NativeArray<T> value, Allocator allocator, FastBufferWriter.ForGeneric unused = default) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
NativeArray<T> | value | The values to read |
Allocator | allocator | The allocator to use to construct the resulting NativeArray |
FastBufferWriter.ForGeneric | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
ReadValue<T>(out T, ForPrimitives)
Read 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.
Declaration
public void ReadValue<T>(out T value, FastBufferWriter.ForPrimitives unused = default) where T : unmanaged, IComparable, IConvertible, IComparable<T>, IEquatable<T>
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to read |
FastBufferWriter.ForPrimitives | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
ReadValue<T>(out T[], ForPrimitives)
Read a primitive value array (int, bool, etc) Accepts any value that implements the given interfaces, but is not guaranteed to work correctly on values that are not primitives.
Declaration
public void ReadValue<T>(out T[] value, FastBufferWriter.ForPrimitives unused = default) where T : unmanaged, IComparable, IConvertible, IComparable<T>, IEquatable<T>
Parameters
Type | Name | Description |
---|---|---|
T[] | value | The values to read |
FastBufferWriter.ForPrimitives | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
ReadValue<T>(out T, ForEnums)
Read an enum value
Declaration
public void ReadValue<T>(out T value, FastBufferWriter.ForEnums unused = default) where T : unmanaged, Enum
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to read |
FastBufferWriter.ForEnums | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
ReadValue<T>(out T[], ForEnums)
Read an enum array
Declaration
public void ReadValue<T>(out T[] value, FastBufferWriter.ForEnums unused = default) where T : unmanaged, Enum
Parameters
Type | Name | Description |
---|---|---|
T[] | value | The values to read |
FastBufferWriter.ForEnums | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
ReadValue(out Vector2)
Read a Vector2
Declaration
public void ReadValue(out Vector2 value)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | value | the value to read |
ReadValue(out Vector2[])
Read a Vector2 array
Declaration
public void ReadValue(out Vector2[] value)
Parameters
Type | Name | Description |
---|---|---|
Vector2[] | value | the values to read |
ReadValue(out Vector3)
Read a Vector3
Declaration
public void ReadValue(out Vector3 value)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | value | the value to read |
ReadValue(out Vector3[])
Read a Vector3 array
Declaration
public void ReadValue(out Vector3[] value)
Parameters
Type | Name | Description |
---|---|---|
Vector3[] | value | the values to read |
ReadValue(out Vector2Int)
Read a Vector2Int
Declaration
public void ReadValue(out Vector2Int value)
Parameters
Type | Name | Description |
---|---|---|
Vector2Int | value | the value to read |
ReadValue(out Vector2Int[])
Read a Vector2Int array
Declaration
public void ReadValue(out Vector2Int[] value)
Parameters
Type | Name | Description |
---|---|---|
Vector2Int[] | value | the values to read |
ReadValue(out Vector3Int)
Read a Vector3Int
Declaration
public void ReadValue(out Vector3Int value)
Parameters
Type | Name | Description |
---|---|---|
Vector3Int | value | the value to read |
ReadValue(out Vector3Int[])
Read a Vector3Int array
Declaration
public void ReadValue(out Vector3Int[] value)
Parameters
Type | Name | Description |
---|---|---|
Vector3Int[] | value | the value to read |
ReadValue(out Vector4)
Read a Vector4
Declaration
public void ReadValue(out Vector4 value)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | value | the value to read |
ReadValue(out Vector4[])
Read a Vector4
Declaration
public void ReadValue(out Vector4[] value)
Parameters
Type | Name | Description |
---|---|---|
Vector4[] | value | the values to read |
ReadValue(out Quaternion)
Read a Quaternion
Declaration
public void ReadValue(out Quaternion value)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | value | the value to read |
ReadValue(out Quaternion[])
Read a Quaternion array
Declaration
public void ReadValue(out Quaternion[] value)
Parameters
Type | Name | Description |
---|---|---|
Quaternion[] | value | the values to read |
ReadValue(out Color)
Read a Color
Declaration
public void ReadValue(out Color value)
Parameters
Type | Name | Description |
---|---|---|
Color | value | the value to read |
ReadValue(out Color[])
Read a Color array
Declaration
public void ReadValue(out Color[] value)
Parameters
Type | Name | Description |
---|---|---|
Color[] | value | the values to read |
ReadValue(out Color32)
Read a Color32
Declaration
public void ReadValue(out Color32 value)
Parameters
Type | Name | Description |
---|---|---|
Color32 | value | the value to read |
ReadValue(out Color32[])
Read a Color32 array
Declaration
public void ReadValue(out Color32[] value)
Parameters
Type | Name | Description |
---|---|---|
Color32[] | value | the values to read |
ReadValue(out Ray)
Read a Ray
Declaration
public void ReadValue(out Ray value)
Parameters
Type | Name | Description |
---|---|---|
Ray | value | the value to read |
ReadValue(out Ray[])
Read a Ray array
Declaration
public void ReadValue(out Ray[] value)
Parameters
Type | Name | Description |
---|---|---|
Ray[] | value | the values to read |
ReadValue(out Ray2D)
Read a Ray2D
Declaration
public void ReadValue(out Ray2D value)
Parameters
Type | Name | Description |
---|---|---|
Ray2D | value | the value to read |
ReadValue(out Ray2D[])
Read a Ray2D array
Declaration
public void ReadValue(out Ray2D[] value)
Parameters
Type | Name | Description |
---|---|---|
Ray2D[] | value | the values to read |
ReadValue<T>(out T, ForFixedStrings)
Read a FixedString value. This method is a little difficult to use, since you have to know the size of the string before reading it, but is useful when the string is a known, fixed size. Note that the size of the string is also encoded, so the size to call TryBeginRead on is actually the fixed size (in bytes) plus sizeof(int)
Declaration
public void ReadValue<T>(out T value, FastBufferWriter.ForFixedStrings unused = default) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | value | the value to read |
FastBufferWriter.ForFixedStrings | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |