docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ToArchetypeChunkListAsync

    ToArchetypeChunkListAsync(AllocatorHandle, out JobHandle)

    Asynchronously creates a list of the chunks containing entities matching this EntityQuery.

    Declaration
    public NativeList<ArchetypeChunk> ToArchetypeChunkListAsync(AllocatorManager.AllocatorHandle allocator, out JobHandle outJobHandle)
    Parameters
    Type Name Description
    AllocatorManager.AllocatorHandle allocator

    Allocator to use for the list.

    JobHandle outJobHandle

    An out parameter assigned the handle to the internal job that gathers the chunks matching this EntityQuery.

    Returns
    Type Description
    NativeList<ArchetypeChunk>

    A list containing all the chunks selected by the query. The contents of this list (including the list's Length property) must not be accessed before outJobHandle has been completed. To pass this list to a job that expects a NativeArray`1, use AsDeferredJobArray().

    Remarks

    Use outJobHandle as a dependency for jobs that use the returned chunk array.

    See Also
    IJobParallelForDefer

    ToArchetypeChunkListAsync(AllocatorHandle, JobHandle, out JobHandle)

    Asynchronously creates a list of the chunks containing entities matching this EntityQuery.

    Declaration
    public NativeList<ArchetypeChunk> ToArchetypeChunkListAsync(AllocatorManager.AllocatorHandle allocator, JobHandle additionalInputDep, out JobHandle outJobHandle)
    Parameters
    Type Name Description
    AllocatorManager.AllocatorHandle allocator

    Allocator to use for the list.

    JobHandle additionalInputDep

    A job handle which the newly scheduled job will depend upon, in addition to the dependencies automatically determined by the component safety system.

    JobHandle outJobHandle

    An out parameter assigned the handle to the internal job that gathers the chunks matching this EntityQuery.

    Returns
    Type Description
    NativeList<ArchetypeChunk>

    A list containing all the chunks matched by the query. The contents of this list (including the list's Length property) must not be accessed before outJobHandle has been completed. To pass this list to a job that expects a NativeArray`1, use AsDeferredJobArray().

    Remarks

    Use outJobHandle as a dependency for jobs that use the returned chunk array. If the query contains enableable components, chunks that contain zero entities with all relevant components enabled will not be included in the output list.

    See Also
    IJobParallelForDefer
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)