Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

EntityManager.GetAllChunks

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public NativeArray<ArchetypeChunk> GetAllChunks(Allocator allocator);

Parameters

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

Returns

NativeArray<ArchetypeChunk> An array of ArchetypeChunk objects referring to all the chunks in the EntityManager.World.

Description

Gets all the chunks managed by this EntityManager.

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.


Declaration

public NativeArray<ArchetypeChunk> GetAllChunks(AllocatorHandle allocator);

Parameters

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

Returns

NativeArray<ArchetypeChunk> An array of ArchetypeChunk objects referring to all the chunks in the EntityManager.World.

Description

Gets all the chunks managed by this EntityManager.

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.