Struct LayoutUtility
Low-level utility functions for AOS->SOA (scatter) and SOA->AOS (gather) conversions.
Namespace: Unity.Entities
Syntax
public struct LayoutUtility
Methods
GatherChunkedSOA8(NativeArray<SOAFieldInfo>, Int32, Byte*, Void*, Int32)
Declaration
public static void GatherChunkedSOA8(NativeArray<SOAFieldInfo> fields, int fieldSizeSum, byte *sourceBaseAddress, void *target, int sourceIndex)
Parameters
| Type | Name | Description | 
|---|---|---|
| NativeArray<SOAFieldInfo> | fields | |
| Int32 | fieldSizeSum | |
| Byte* | sourceBaseAddress | |
| Void* | target | |
| Int32 | sourceIndex | 
GatherFullSOA(NativeArray<SOAFieldInfo>, Byte*, Void*, Int32, Int32)
Gather AOS data from fully parallel arrays of fields.
Declaration
public static void GatherFullSOA(NativeArray<SOAFieldInfo> fields, byte *sourceBaseAddress, void *target, int sourceIndex, int sourceArraySize)
Parameters
| Type | Name | Description | 
|---|---|---|
| NativeArray<SOAFieldInfo> | fields | Struct type descriptor  | 
| Byte* | sourceBaseAddress | Pointer to first byte of source SOA array  | 
| Void* | target | Pointer to target AOS struct instance to be gathered into  | 
| Int32 | sourceIndex | The index of the SOA element to be gathered  | 
| Int32 | sourceArraySize | The number of elements in the SOA data  | 
ScatterChunkedSOA8(NativeArray<SOAFieldInfo>, Int32, Byte*, Void*, Int32)
Declaration
public static void ScatterChunkedSOA8(NativeArray<SOAFieldInfo> fields, int fieldSizeSum, byte *targetBaseAddress, void *source, int targetIndex)
Parameters
| Type | Name | Description | 
|---|---|---|
| NativeArray<SOAFieldInfo> | fields | |
| Int32 | fieldSizeSum | |
| Byte* | targetBaseAddress | |
| Void* | source | |
| Int32 | targetIndex | 
ScatterFullSOA(NativeArray<SOAFieldInfo>, Byte*, Void*, Int32, Int32)
Declaration
public static void ScatterFullSOA(NativeArray<SOAFieldInfo> fields, byte *targetBaseAddress, void *source, int targetIndex, int targetArraySize)
Parameters
| Type | Name | Description | 
|---|---|---|
| NativeArray<SOAFieldInfo> | fields | |
| Byte* | targetBaseAddress | |
| Void* | source | |
| Int32 | targetIndex | |
| Int32 | targetArraySize |