Struct Buffer
Syntax
public struct Buffer : IDisposable
Properties
CanRead
Declaration
public bool CanRead { get; }
Property Value
EndRead
Declaration
public bool EndRead { get; }
Property Value
Length
Declaration
public int Length { get; }
Property Value
Size
Declaration
Property Value
Methods
Append(Byte)
Declaration
public void Append(byte value)
Parameters
| Type |
Name |
Description |
| Byte |
value |
|
Append(NativeArray<Byte>)
Declaration
public void Append(NativeArray<byte> elements)
Parameters
Clear()
Declaration
Copy(Buffer)
Declaration
public void Copy(Buffer from)
Parameters
| Type |
Name |
Description |
| Buffer |
from |
|
Create(Byte[], Allocator)
Declaration
public static Buffer Create(byte[] data, Allocator allocator)
Parameters
Returns
Create(Int32, Allocator)
Declaration
public static Buffer Create(int capacity, Allocator allocator)
Parameters
Returns
Create(Allocator)
Declaration
public static Buffer Create(Allocator allocator)
Parameters
Returns
Dispose()
Declaration
PrepareForRead()
Declaration
public void PrepareForRead()
ReadBlittable<T>()
Declaration
public T ReadBlittable<T>()
where T : struct
Returns
Type Parameters
ReadBlittableGeneric(Type)
Declaration
public object ReadBlittableGeneric(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
ReadByte()
Declaration
Returns
ReadSlice(Int32)
Declaration
public NativeSlice<byte> ReadSlice(int size)
Parameters
| Type |
Name |
Description |
| Int32 |
size |
|
Returns
SetCursor(Int32)
Declaration
public int SetCursor(int cursor)
Parameters
| Type |
Name |
Description |
| Int32 |
cursor |
|
Returns
WriteBlittable<T>(T)
Declaration
public void WriteBlittable<T>(T val)
where T : struct
Parameters
| Type |
Name |
Description |
| T |
val |
|
Type Parameters
WriteBlittableGeneric(Object)
Declaration
public void WriteBlittableGeneric(object val)
Parameters
| Type |
Name |
Description |
| Object |
val |
|
Extension Methods