Method GetDynamicComponentDataArrayReinterpret
GetDynamicComponentDataArrayReinterpret<T>(ref DynamicComponentTypeHandle, int)
Construct a NativeArray view of a chunk's component data.
Declaration
public readonly NativeArray<T> GetDynamicComponentDataArrayReinterpret<T>(ref DynamicComponentTypeHandle typeHandle, int expectedTypeSize) where T : struct
Parameters
| Type | Name | Description |
|---|---|---|
| DynamicComponentTypeHandle | typeHandle | Type handle for the target component type |
| int | expectedTypeSize | The expected size (in bytes) of the target component type. It is an error to pass a size that does not match the target type's actual size. |
Returns
| Type | Description |
|---|---|
| NativeArray<T> | A NativeArray which aliases the chunk's component value array for type |
Type Parameters
| Name | Description |
|---|---|
| T | The target component type |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown if |
| InvalidOperationException | Thrown if |
GetDynamicComponentDataArrayReinterpret<T>(DynamicComponentTypeHandle, int)
Obsolete. Use GetDynamicComponentDataArrayReinterpret<T>(ref DynamicComponentTypeHandle, int) instead.
Declaration
[Obsolete("The typeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly NativeArray<T> GetDynamicComponentDataArrayReinterpret<T>(DynamicComponentTypeHandle typeHandle, int expectedTypeSize) where T : struct
Parameters
| Type | Name | Description |
|---|---|---|
| DynamicComponentTypeHandle | typeHandle | Type handle for the target component type |
| int | expectedTypeSize | The expected size (in bytes) of the target component type. It is an error to pass a size that does not match the target type's actual size. |
Returns
| Type | Description |
|---|---|
| NativeArray<T> | A NativeArray which aliases the chunk's component value array for type |
Type Parameters
| Name | Description |
|---|---|
| T | The target component type |