Struct SortJob<T, U>
Returned by the SortJob methods of NativeSortExtension. Call Schedule to schedule the sorting.
Namespace: Unity.Collections
Assembly: Unity.Collections.dll
Syntax
public struct SortJob<T, U> where T : unmanaged where U : IComparer<T>
Type Parameters
| Name | Description |
|---|---|
| T | The type of the elements to sort. |
| U | The type of the comparer. |
Remarks
When RegisterGenericJobType is used on SortJob, to complete registration you must register SortJob<T,U>.SegmentSort and SortJob<T,U>.SegmentSortMerge.
Fields
Comp
Comparison function.
Declaration
public U Comp
Field Value
| Type | Description |
|---|---|
| U |
Data
The data to sort.
Declaration
public T* Data
Field Value
| Type | Description |
|---|---|
| T* |
Length
The length to sort.
Declaration
public int Length
Field Value
| Type | Description |
|---|---|
| int |
Methods
Schedule(JobHandle)
Schedules this job.
Declaration
public JobHandle Schedule(JobHandle inputDeps = default)
Parameters
| Type | Name | Description |
|---|---|---|
| JobHandle | inputDeps | Handle of a job to depend upon. |
Returns
| Type | Description |
|---|---|
| JobHandle | The handle of this newly scheduled job. |