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

EntityArchetype.GetComponentTypes

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<ComponentType> GetComponentTypes(Allocator allocator);

Parameters

Parameter Description
allocator The allocation type to use for the returned NativeArray.

Returns

NativeArray<ComponentType> A native array containing the ComponentType objects of this archetype.

Description

Gets the types of the components making up this archetype.

The set of component types in an archetype cannot change; adding components to an entity or removing components from an entity changes the archetype of that entity (possibly resulting in the creation of a new archetype). The original archetype remains unchanged.


Declaration

public NativeArray<ComponentType> GetComponentTypes(AllocatorHandle allocator);

Parameters

Parameter Description
allocator The allocation type to use for the returned NativeArray.

Returns

NativeArray<ComponentType> A native array containing the ComponentType objects of this archetype.

Description

Gets the types of the components making up this archetype.

The set of component types in an archetype cannot change; adding components to an entity or removing components from an entity changes the archetype of that entity (possibly resulting in the creation of a new archetype). The original archetype remains unchanged.