Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SortJobDefer

Returns a job which will sort this list in ascending order.
Read time 1 minuteLast updated 13 days ago

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule

SortJobDefer<T>(NativeList<T>)

Returns a job which will sort this list in ascending order.
public static SortJobDefer<T, NativeSortExtension.DefaultComparer<T>> SortJobDefer<T>(this NativeList<T> container) where T : unmanaged, IComparable<T>

Parameters

container

The list to sort.

Returns

Type

Description

SortJobDefer<T, DefaultComparer<T>>A job for sorting this list.

Remarks

SortJobDefer
is intended for use when
NativeList.Length
is not known at scheduling time, and it depends on completion of previosly scheduled job(s). This method does not schedule the job. Scheduling the job is left to you.

SortJobDefer<T, U>(NativeList<T>, T)

Returns a job which will sort this list using a custom comparison.
public static SortJobDefer<T, U> SortJobDefer<T, U>(this NativeList<T> container, U comp) where T : unmanaged where U : IComparer<T>

Parameters

container

The list to sort.

comp

T
The comparison function used to determine the relative order of the elements.

Returns

Type

Description

SortJobDefer<T, T>A job for sorting this list.

Remarks

SortJobDefer
is intended for use when
NativeList.Length
is not known at scheduling time, and it depends on completion of previosly scheduled job(s). This method does not schedule the job. Scheduling the job is left to you.