Method GetWriteSize
GetWriteSize(string, bool)
Get the required size to write a string
Declaration
public static int GetWriteSize(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
|
Returns
GetWriteSize<T>(T[], int, int)
Get the required size to write an unmanaged array
Declaration
public static int GetWriteSize<T>(T[] array, int count = -1, int offset = 0) where T : unmanaged
Parameters
Type |
Name |
Description |
T[] |
array |
The array to write
|
int |
count |
The amount of elements to write
|
int |
offset |
Where in the array to start
|
Returns
Type Parameters
GetWriteSize<T>(NativeArray<T>, int, int)
Get the required size to write a NativeArray
Declaration
public static int GetWriteSize<T>(NativeArray<T> array, int count = -1, int offset = 0) where T : unmanaged
Parameters
Type |
Name |
Description |
NativeArray<T> |
array |
The array to write
|
int |
count |
The amount of elements to write
|
int |
offset |
Where in the array to start
|
Returns
Type Parameters
GetWriteSize<T>(in T, ForStructs)
Get the write size for any general unmanaged value
The ForStructs value here makes this the lowest-priority overload so other versions
will be prioritized over this if they match
Declaration
public static int GetWriteSize<T>(in T value, FastBufferWriter.ForStructs unused = default) where T : unmanaged
Parameters
Returns
Type Parameters
GetWriteSize<T>(in T)
Get the write size for a FixedString
Declaration
public static int GetWriteSize<T>(in T value) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type |
Name |
Description |
T |
value |
|
Returns
Type Parameters
GetWriteSize<T>(in NativeArray<T>)
Get the write size for an array of FixedStrings
Declaration
public static int GetWriteSize<T>(in NativeArray<T> value) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Returns
Type Parameters
GetWriteSize<T>()
Get the size required to write an unmanaged value of type T
Declaration
public static int GetWriteSize<T>() where T : unmanaged
Returns
Type Parameters