docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetAllChunksAndMetaChunks

    GetAllChunksAndMetaChunks(Allocator)

    Gets all the chunks managed by this EntityManager, including the meta chunks (containing chunk components).

    Declaration
    public NativeArray<ArchetypeChunk> GetAllChunksAndMetaChunks(Allocator allocator = Allocator.TempJob)
    Parameters
    Type Name Description
    Allocator allocator

    The type of allocation for creating the NativeArray to hold the ArchetypeChunk objects.

    Returns
    Type Description
    NativeArray<ArchetypeChunk>

    An array of ArchetypeChunk objects referring to all the chunks in the World.

    Remarks

    Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before getting the chunk. No additional jobs can start before the method is finished. A sync point can cause a drop in performance because the ECS framework might not be able to use the processing power of all available cores.

    GetAllChunksAndMetaChunks(AllocatorHandle)

    Gets all the chunks managed by this EntityManager, including the meta chunks (containing chunk components).

    Declaration
    public NativeArray<ArchetypeChunk> GetAllChunksAndMetaChunks(AllocatorManager.AllocatorHandle allocator)
    Parameters
    Type Name Description
    AllocatorManager.AllocatorHandle allocator

    The type of allocation for creating the NativeArray to hold the ArchetypeChunk objects.

    Returns
    Type Description
    NativeArray<ArchetypeChunk>

    An array of ArchetypeChunk objects referring to all the chunks in the World.

    Remarks

    Important: This method creates a sync point, which means that the EntityManager waits for all currently running jobs to complete before getting the chunk. No additional jobs can start before the method is finished. A sync point can cause a drop in performance because the ECS framework might not be able to use the processing power of all available cores.

    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)