Method GetAllUniqueSharedComponents
GetAllUniqueSharedComponents<T>(out NativeList<T>, AllocatorHandle)
Gets a list of all the unique instances of an unmanaged shared component type.
Declaration
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[] { typeof(BurstCompatibleSharedComponentData) })]
public void GetAllUniqueSharedComponents<T>(out NativeList<T> sharedComponentValues, AllocatorManager.AllocatorHandle allocator) where T : unmanaged, ISharedComponentData
Parameters
Type | Name | Description |
---|---|---|
NativeList<T> | sharedComponentValues | A List<T> object to receive the unique instances of the shared component of type T. |
AllocatorManager.AllocatorHandle | allocator | The allocator for the native list of sharedComponentValues |
Type Parameters
Name | Description |
---|---|
T | The type of shared component. |
Remarks
All entities with the same archetype and the same values for a shared component are stored in the same set
of chunks. This function finds the unique shared components existing across chunks and archetype and
fills a list with copies of those components.
Note that the first element of the output list will always be the default value for T
,
even if no entities or chunks currently use that value.