Method WriteValue
WriteValue(string, bool)
Writes a string
Declaration
public void WriteValue(string s, bool oneByteChars = false)
Parameters
Type | Name | Description |
---|---|---|
string | s | The string to write |
bool | oneByteChars | Whether or not to use one byte per character. This will only allow ASCII |
WriteValue<T>(in T, ForNetworkSerializable)
Write a NetworkSerializable value
Declaration
public void WriteValue<T>(in T value, FastBufferWriter.ForNetworkSerializable unused = default) where T : INetworkSerializable
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to write |
FastBufferWriter.ForNetworkSerializable | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
WriteValue<T>(T[], ForNetworkSerializable)
Write a NetworkSerializable array
Declaration
public void WriteValue<T>(T[] value, FastBufferWriter.ForNetworkSerializable unused = default) where T : INetworkSerializable
Parameters
Type | Name | Description |
---|---|---|
T[] | value | The values to write |
FastBufferWriter.ForNetworkSerializable | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
WriteValue<T>(in T, ForStructs)
Write a struct
Declaration
public void WriteValue<T>(in T value, FastBufferWriter.ForStructs unused = default) where T : unmanaged, INetworkSerializeByMemcpy
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to write |
FastBufferWriter.ForStructs | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
WriteValue<T>(T[], ForStructs)
Write a struct array
Declaration
public void WriteValue<T>(T[] value, FastBufferWriter.ForStructs unused = default) where T : unmanaged, INetworkSerializeByMemcpy
Parameters
Type | Name | Description |
---|---|---|
T[] | value | The values to write |
FastBufferWriter.ForStructs | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
WriteValue<T>(NativeArray<T>, ForGeneric)
Write a struct NativeArray
Declaration
public void WriteValue<T>(NativeArray<T> value, FastBufferWriter.ForGeneric unused = default) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
NativeArray<T> | value | The values to write |
FastBufferWriter.ForGeneric | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
WriteValue<T>(in T, ForPrimitives)
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.
Declaration
public void WriteValue<T>(in T value, FastBufferWriter.ForPrimitives unused = default) where T : unmanaged, IComparable, IConvertible, IComparable<T>, IEquatable<T>
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to write |
FastBufferWriter.ForPrimitives | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
WriteValue<T>(T[], ForPrimitives)
Write 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 WriteValue<T>(T[] value, FastBufferWriter.ForPrimitives unused = default) where T : unmanaged, IComparable, IConvertible, IComparable<T>, IEquatable<T>
Parameters
Type | Name | Description |
---|---|---|
T[] | value | The values to write |
FastBufferWriter.ForPrimitives | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
WriteValue<T>(in T, ForEnums)
Write an enum value
Declaration
public void WriteValue<T>(in T value, FastBufferWriter.ForEnums unused = default) where T : unmanaged, Enum
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to write |
FastBufferWriter.ForEnums | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
WriteValue<T>(T[], ForEnums)
Write an enum array
Declaration
public void WriteValue<T>(T[] value, FastBufferWriter.ForEnums unused = default) where T : unmanaged, Enum
Parameters
Type | Name | Description |
---|---|---|
T[] | value | The values to write |
FastBufferWriter.ForEnums | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
WriteValue(in Vector2)
Write a Vector2
Declaration
public void WriteValue(in Vector2 value)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | value | the value to write |
WriteValue(Vector2[])
Write a Vector2 array
Declaration
public void WriteValue(Vector2[] value)
Parameters
Type | Name | Description |
---|---|---|
Vector2[] | value | the values to write |
WriteValue(in Vector3)
Write a Vector3
Declaration
public void WriteValue(in Vector3 value)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | value | the value to write |
WriteValue(Vector3[])
Write a Vector3 array
Declaration
public void WriteValue(Vector3[] value)
Parameters
Type | Name | Description |
---|---|---|
Vector3[] | value | the values to write |
WriteValue(in Vector2Int)
Write a Vector2Int
Declaration
public void WriteValue(in Vector2Int value)
Parameters
Type | Name | Description |
---|---|---|
Vector2Int | value | the value to write |
WriteValue(Vector2Int[])
Write a Vector2Int array
Declaration
public void WriteValue(Vector2Int[] value)
Parameters
Type | Name | Description |
---|---|---|
Vector2Int[] | value | the values to write |
WriteValue(in Vector3Int)
Write a Vector3Int
Declaration
public void WriteValue(in Vector3Int value)
Parameters
Type | Name | Description |
---|---|---|
Vector3Int | value | the value to write |
WriteValue(Vector3Int[])
Write a Vector3Int array
Declaration
public void WriteValue(Vector3Int[] value)
Parameters
Type | Name | Description |
---|---|---|
Vector3Int[] | value | the value to write |
WriteValue(in Vector4)
Write a Vector4
Declaration
public void WriteValue(in Vector4 value)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | value | the value to write |
WriteValue(Vector4[])
Write a Vector4
Declaration
public void WriteValue(Vector4[] value)
Parameters
Type | Name | Description |
---|---|---|
Vector4[] | value | the values to write |
WriteValue(in Quaternion)
Write a Quaternion
Declaration
public void WriteValue(in Quaternion value)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | value | the value to write |
WriteValue(Quaternion[])
Write a Quaternion array
Declaration
public void WriteValue(Quaternion[] value)
Parameters
Type | Name | Description |
---|---|---|
Quaternion[] | value | the values to write |
WriteValue(in Color)
Write a Color
Declaration
public void WriteValue(in Color value)
Parameters
Type | Name | Description |
---|---|---|
Color | value | the value to write |
WriteValue(Color[])
Write a Color array
Declaration
public void WriteValue(Color[] value)
Parameters
Type | Name | Description |
---|---|---|
Color[] | value | the values to write |
WriteValue(in Color32)
Write a Color32
Declaration
public void WriteValue(in Color32 value)
Parameters
Type | Name | Description |
---|---|---|
Color32 | value | the value to write |
WriteValue(Color32[])
Write a Color32 array
Declaration
public void WriteValue(Color32[] value)
Parameters
Type | Name | Description |
---|---|---|
Color32[] | value | the values to write |
WriteValue(in Ray)
Write a Ray
Declaration
public void WriteValue(in Ray value)
Parameters
Type | Name | Description |
---|---|---|
Ray | value | the value to write |
WriteValue(Ray[])
Write a Ray array
Declaration
public void WriteValue(Ray[] value)
Parameters
Type | Name | Description |
---|---|---|
Ray[] | value | the values to write |
WriteValue(in Ray2D)
Write a Ray2D
Declaration
public void WriteValue(in Ray2D value)
Parameters
Type | Name | Description |
---|---|---|
Ray2D | value | the value to write |
WriteValue(Ray2D[])
Write a Ray2D array
Declaration
public void WriteValue(Ray2D[] value)
Parameters
Type | Name | Description |
---|---|---|
Ray2D[] | value | the values to write |
WriteValue<T>(in T, ForFixedStrings)
Write a FixedString value. Writes only the part of the string that's actually used. When calling TryBeginWrite, ensure you calculate the write size correctly (preferably by calling FastBufferWriter.GetWriteSize())
Declaration
public void WriteValue<T>(in T value, FastBufferWriter.ForFixedStrings unused = default) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | value | the value to write |
FastBufferWriter.ForFixedStrings | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
WriteValue<T>(T[], ForFixedStrings)
Write an array of FixedString values. Writes only the part of each string that's actually used. When calling TryBeginWrite, ensure you calculate the write size correctly (preferably by calling FastBufferWriter.GetWriteSize())
Declaration
public void WriteValue<T>(T[] value, FastBufferWriter.ForFixedStrings unused = default) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T[] | value | the value to write |
FastBufferWriter.ForFixedStrings | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |
WriteValue<T>(in NativeArray<T>, ForFixedStrings)
Write a NativeArray of FixedString values. Writes only the part of each string that's actually used. When calling TryBeginWrite, ensure you calculate the write size correctly (preferably by calling FastBufferWriter.GetWriteSize())
Declaration
public void WriteValue<T>(in NativeArray<T> value, FastBufferWriter.ForFixedStrings unused = default) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
NativeArray<T> | value | the value to write |
FastBufferWriter.ForFixedStrings | unused | An unused parameter used for enabling overload resolution based on generic constraints |
Type Parameters
Name | Description |
---|---|
T | The type being serialized |