Class KaijuAgentsSortDistance3
Extension methods for sorting objects by their distance to a given position along all three axes. Any Vector2 values will be expanded via the Expand(Vector2) method.
Inheritance
Namespace: KaijuSolutions.Agents.Extensions
Syntax
public static class KaijuAgentsSortDistance3
Methods
SortDistance3(Component, GameObject[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Component position, GameObject[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| GameObject[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Component, IEnumerable<GameObject>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static GameObject[] SortDistance3(this Component position, IEnumerable<GameObject> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<GameObject> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| GameObject[] | The sorted array. |
SortDistance3(Component, IEnumerable<Transform>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Transform[] SortDistance3(this Component position, IEnumerable<Transform> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Transform> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| Transform[] | The sorted array. |
SortDistance3(Component, IEnumerable<Vector2>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Vector2[] SortDistance3(this Component position, IEnumerable<Vector2> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Vector2> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| Vector2[] | The sorted array. |
SortDistance3(Component, IEnumerable<Vector3>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Vector3[] SortDistance3(this Component position, IEnumerable<Vector3> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Vector3> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| Vector3[] | The sorted array. |
SortDistance3(Component, List<GameObject>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Component position, List<GameObject> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| System.Collections.Generic.List<GameObject> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Component, List<Transform>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Component position, List<Transform> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| System.Collections.Generic.List<Transform> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Component, List<Vector2>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Component position, List<Vector2> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| System.Collections.Generic.List<Vector2> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Component, List<Vector3>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Component position, List<Vector3> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| System.Collections.Generic.List<Vector3> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Component, Transform[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Component position, Transform[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| Transform[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Component, Vector2[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Component position, Vector2[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| Vector2[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Component, Vector3[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Component position, Vector3[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| Vector3[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(GameObject, GameObject[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this GameObject position, GameObject[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| GameObject[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(GameObject, IEnumerable<GameObject>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static GameObject[] SortDistance3(this GameObject position, IEnumerable<GameObject> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<GameObject> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| GameObject[] | The sorted array. |
SortDistance3(GameObject, IEnumerable<Transform>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Transform[] SortDistance3(this GameObject position, IEnumerable<Transform> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Transform> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| Transform[] | The sorted array. |
SortDistance3(GameObject, IEnumerable<Vector2>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Vector2[] SortDistance3(this GameObject position, IEnumerable<Vector2> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Vector2> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| Vector2[] | The sorted array. |
SortDistance3(GameObject, IEnumerable<Vector3>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Vector3[] SortDistance3(this GameObject position, IEnumerable<Vector3> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Vector3> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| Vector3[] | The sorted array. |
SortDistance3(GameObject, List<GameObject>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this GameObject position, List<GameObject> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| System.Collections.Generic.List<GameObject> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(GameObject, List<Transform>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this GameObject position, List<Transform> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| System.Collections.Generic.List<Transform> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(GameObject, List<Vector2>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this GameObject position, List<Vector2> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| System.Collections.Generic.List<Vector2> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(GameObject, List<Vector3>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this GameObject position, List<Vector3> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| System.Collections.Generic.List<Vector3> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(GameObject, Transform[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this GameObject position, Transform[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| Transform[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(GameObject, Vector2[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this GameObject position, Vector2[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| Vector2[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(GameObject, Vector3[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this GameObject position, Vector3[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| Vector3[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Transform, GameObject[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Transform position, GameObject[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| GameObject[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Transform, IEnumerable<GameObject>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static GameObject[] SortDistance3(this Transform position, IEnumerable<GameObject> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<GameObject> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| GameObject[] | The sorted array. |
SortDistance3(Transform, IEnumerable<Transform>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Transform[] SortDistance3(this Transform position, IEnumerable<Transform> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Transform> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| Transform[] | The sorted array. |
SortDistance3(Transform, IEnumerable<Vector2>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Vector2[] SortDistance3(this Transform position, IEnumerable<Vector2> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Vector2> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| Vector2[] | The sorted array. |
SortDistance3(Transform, IEnumerable<Vector3>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Vector3[] SortDistance3(this Transform position, IEnumerable<Vector3> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Vector3> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| Vector3[] | The sorted array. |
SortDistance3(Transform, List<GameObject>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Transform position, List<GameObject> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| System.Collections.Generic.List<GameObject> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Transform, List<Transform>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Transform position, List<Transform> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| System.Collections.Generic.List<Transform> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Transform, List<Vector2>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Transform position, List<Vector2> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| System.Collections.Generic.List<Vector2> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Transform, List<Vector3>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Transform position, List<Vector3> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| System.Collections.Generic.List<Vector3> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Transform, Transform[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Transform position, Transform[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| Transform[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Transform, Vector2[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Transform position, Vector2[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| Vector2[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Transform, Vector3[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Transform position, Vector3[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| Vector3[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
SortDistance3(Vector2, GameObject[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector2 position, GameObject[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| GameObject[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector2, IEnumerable<GameObject>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static GameObject[] SortDistance3(this Vector2 position, IEnumerable<GameObject> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<GameObject> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Returns
| Type | Description |
|---|---|
| GameObject[] | The sorted array. |
SortDistance3(Vector2, IEnumerable<Transform>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Transform[] SortDistance3(this Vector2 position, IEnumerable<Transform> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Transform> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Returns
| Type | Description |
|---|---|
| Transform[] | The sorted array. |
SortDistance3(Vector2, IEnumerable<Vector2>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Vector2[] SortDistance3(this Vector2 position, IEnumerable<Vector2> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Vector2> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Returns
| Type | Description |
|---|---|
| Vector2[] | The sorted array. |
SortDistance3(Vector2, IEnumerable<Vector3>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Vector3[] SortDistance3(this Vector2 position, IEnumerable<Vector3> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Vector3> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Returns
| Type | Description |
|---|---|
| Vector3[] | The sorted array. |
SortDistance3(Vector2, List<GameObject>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector2 position, List<GameObject> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| System.Collections.Generic.List<GameObject> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector2, List<Transform>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector2 position, List<Transform> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| System.Collections.Generic.List<Transform> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector2, List<Vector2>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector2 position, List<Vector2> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| System.Collections.Generic.List<Vector2> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector2, List<Vector3>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector2 position, List<Vector3> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| System.Collections.Generic.List<Vector3> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector2, Transform[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector2 position, Transform[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| Transform[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector2, Vector2[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector2 position, Vector2[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| Vector2[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector2, Vector3[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector2 position, Vector3[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| Vector3[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector3, GameObject[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector3 position, GameObject[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| GameObject[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector3, IEnumerable<GameObject>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static GameObject[] SortDistance3(this Vector3 position, IEnumerable<GameObject> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<GameObject> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Returns
| Type | Description |
|---|---|
| GameObject[] | The sorted array. |
SortDistance3(Vector3, IEnumerable<Transform>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Transform[] SortDistance3(this Vector3 position, IEnumerable<Transform> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Transform> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Returns
| Type | Description |
|---|---|
| Transform[] | The sorted array. |
SortDistance3(Vector3, IEnumerable<Vector2>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Vector2[] SortDistance3(this Vector3 position, IEnumerable<Vector2> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Vector2> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Returns
| Type | Description |
|---|---|
| Vector2[] | The sorted array. |
SortDistance3(Vector3, IEnumerable<Vector3>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static Vector3[] SortDistance3(this Vector3 position, IEnumerable<Vector3> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<Vector3> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Returns
| Type | Description |
|---|---|
| Vector3[] | The sorted array. |
SortDistance3(Vector3, List<GameObject>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector3 position, List<GameObject> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| System.Collections.Generic.List<GameObject> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector3, List<Transform>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector3 position, List<Transform> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| System.Collections.Generic.List<Transform> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector3, List<Vector2>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector3 position, List<Vector2> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| System.Collections.Generic.List<Vector2> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector3, List<Vector3>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector3 position, List<Vector3> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| System.Collections.Generic.List<Vector3> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector3, Transform[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector3 position, Transform[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| Transform[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector3, Vector2[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector3 position, Vector2[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| Vector2[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3(Vector3, Vector3[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3(this Vector3 position, Vector3[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| Vector3[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
SortDistance3<T>(Component, T[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3<T>(this Component position, T[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| T[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(Component, IEnumerable<T>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static T[] SortDistance3<T>(this Component position, IEnumerable<T> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<T> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| T[] | The sorted array. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(Component, List<T>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3<T>(this Component position, List<T> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to sort in relation to. |
| System.Collections.Generic.List<T> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(GameObject, T[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3<T>(this GameObject position, T[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| T[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(GameObject, IEnumerable<T>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static T[] SortDistance3<T>(this GameObject position, IEnumerable<T> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<T> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| T[] | The sorted array. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(GameObject, List<T>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3<T>(this GameObject position, List<T> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to sort in relation to. |
| System.Collections.Generic.List<T> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(Transform, T[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3<T>(this Transform position, T[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| T[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(Transform, IEnumerable<T>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static T[] SortDistance3<T>(this Transform position, IEnumerable<T> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<T> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Returns
| Type | Description |
|---|---|
| T[] | The sorted array. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(Transform, List<T>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3<T>(this Transform position, List<T> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to sort in relation to. |
| System.Collections.Generic.List<T> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. If NULL, the position's forward will be used. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(Vector2, T[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3<T>(this Vector2 position, T[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| T[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(Vector2, IEnumerable<T>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static T[] SortDistance3<T>(this Vector2 position, IEnumerable<T> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<T> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Returns
| Type | Description |
|---|---|
| T[] | The sorted array. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(Vector2, List<T>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3<T>(this Vector2 position, List<T> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to sort in relation to. |
| System.Collections.Generic.List<T> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(Vector3, T[], Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3<T>(this Vector3 position, T[] targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| T[] | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(Vector3, IEnumerable<T>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position. This version will produce garbage, and it is recommended to use an inplace method instead.
Declaration
public static T[] SortDistance3<T>(this Vector3 position, IEnumerable<T> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| System.Collections.Generic.IEnumerable<T> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Returns
| Type | Description |
|---|---|
| T[] | The sorted array. |
Type Parameters
| Name | Description |
|---|---|
| T |
SortDistance3<T>(Vector3, List<T>, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)
Sort targets from a position.
Declaration
public static void SortDistance3<T>(this Vector3 position, List<T> targets, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to sort in relation to. |
| System.Collections.Generic.List<T> | targets | The targets to sort. |
| System.Boolean | farthest | If this should sort by farthest items first. |
| System.Nullable<KaijuAngleSortMode> | mode | How to break ties based on angle. |
| System.Nullable<Vector2> | forward | The forward direction to break ties on. |
Type Parameters
| Name | Description |
|---|---|
| T |