Struct BlobBuilderArray<T>
Used by the BlobBuilder methods to reference the arrays within a blob asset.
Namespace: Unity.Entities
Syntax
public struct BlobBuilderArray<T>
where T : struct
Type Parameters
Name | Description |
---|---|
T | The data type of the elements in the array. |
Remarks
Use this reference to initialize the data of a newly created BlobArray<T>.
Constructors
BlobBuilderArray(Void*, Int32)
For internal, BlobBuilder, use only.
Declaration
public BlobBuilderArray(void *data, int length)
Parameters
Type | Name | Description |
---|---|---|
Void* | data | |
Int32 | length |
Properties
Item[Int32]
Array index accessor for the elements in the array.
Declaration
public T this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The sequential index of an array item. |
Property Value
Type | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
IndexOutOfRangeException | Thrown when index is less than zero or greater than the length of the array (minus one). |
Length
Reports the number of elements in the array.
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
GetUnsafePtr()
Provides a pointer to the data stored in the array.
Declaration
public void *GetUnsafePtr()
Returns
Type | Description |
---|---|
Void* | A pointer to the first element in the array. |
Remarks
You can only call this function in an