Struct LayoutUtility | Entities | 0.10.0-preview.6
docs.unity3d.com
    Show / Hide Table of Contents

    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
    In This Article
    • Methods
      • GatherChunkedSOA8(NativeArray<SOAFieldInfo>, Int32, Byte*, Void*, Int32)
      • GatherFullSOA(NativeArray<SOAFieldInfo>, Byte*, Void*, Int32, Int32)
      • ScatterChunkedSOA8(NativeArray<SOAFieldInfo>, Int32, Byte*, Void*, Int32)
      • ScatterFullSOA(NativeArray<SOAFieldInfo>, Byte*, Void*, Int32, Int32)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023