| Parameter | Description |
|---|---|
| sharedComponentValues | A List<T> object to receive the unique instances of the shared component of type T. |
| allocator | The allocator for the native list of sharedComponentValues |
Gets a list of all the unique instances of an unmanaged shared component type.
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.
| Parameter | Description |
|---|---|
| sharedComponentValues | A NativeList<T> to receive the unique instances of the shared component of type T. |
| sharedComponentIndices | A NativeList<int> to receive the indices of those shared components in the internal shared component list. |
| allocator | The allocator for the native lists. |
Gets a list of all the unique instances of an unmanaged shared component type and a corresponding list of indices into the internal shared component list.
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 archetypes and
fills a list with copies of those components, plus a parallel list of their indices in the internal shared
component list. You can use the indices to ask for the same shared components directly by calling
EntityManager.GetSharedComponent, passing in the index. An index remains valid until the shared
component order version changes.
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.