Search Results for

    Show / Hide Table of Contents

    Class KaijuAgentsDistanceSorter

    Comparer class to sort by distance along the X and Z axes. Used in the extension methods found in KaijuAgentsSortDistance.

    Inheritance
    System.Object
    KaijuAgentsDistanceSorter
    Implements
    System.Collections.Generic.IComparer<Vector2>
    System.Collections.Generic.IComparer<Vector3>
    System.Collections.Generic.IComparer<Transform>
    System.Collections.Generic.IComparer<Component>
    System.Collections.Generic.IComparer<GameObject>
    Namespace: KaijuSolutions.Agents.Extensions
    Syntax
    public sealed class KaijuAgentsDistanceSorter : IComparer<Vector2>, IComparer<Vector3>, IComparer<Transform>, IComparer<Component>, IComparer<GameObject>

    Constructors

    KaijuAgentsDistanceSorter()

    Create the sorter.

    Declaration
    public KaijuAgentsDistanceSorter()

    KaijuAgentsDistanceSorter(Component, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)

    Create the sorter.

    Declaration
    public KaijuAgentsDistanceSorter(Component position, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    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.

    KaijuAgentsDistanceSorter(GameObject, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)

    Create the sorter.

    Declaration
    public KaijuAgentsDistanceSorter(GameObject position, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    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.

    KaijuAgentsDistanceSorter(Transform, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)

    Create the sorter.

    Declaration
    public KaijuAgentsDistanceSorter(Transform position, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    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.

    KaijuAgentsDistanceSorter(Vector2, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)

    Create the sorter.

    Declaration
    public KaijuAgentsDistanceSorter(Vector2 position, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    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.

    KaijuAgentsDistanceSorter(Vector3, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)

    Create the sorter.

    Declaration
    public KaijuAgentsDistanceSorter(Vector3 position, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    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.

    Fields

    Farthest

    If this should sort by farthest items first.

    Declaration
    public bool Farthest
    Field Value
    Type Description
    System.Boolean

    Forward

    The forward direction to break ties on.

    Declaration
    public Vector2? Forward
    Field Value
    Type Description
    System.Nullable<Vector2>

    Mode

    How to break ties based on angle.

    Declaration
    public KaijuAngleSortMode? Mode
    Field Value
    Type Description
    System.Nullable<KaijuAngleSortMode>

    Position

    The position to compare against.

    Declaration
    public Vector2 Position
    Field Value
    Type Description
    Vector2

    Properties

    Forward3

    The forward direction to break ties on.

    Declaration
    public Vector3? Forward3 { get; set; }
    Property Value
    Type Description
    System.Nullable<Vector3>

    ForwardComponent

    The forward direction to break ties on.

    Declaration
    public Component ForwardComponent { set; }
    Property Value
    Type Description
    Component

    ForwardGameObject

    The forward direction to break ties on.

    Declaration
    public Component ForwardGameObject { set; }
    Property Value
    Type Description
    Component

    ForwardTransform

    The forward direction to break ties on.

    Declaration
    public Transform ForwardTransform { set; }
    Property Value
    Type Description
    Transform

    Position3

    The position to compare against.

    Declaration
    public Vector3 Position3 { get; set; }
    Property Value
    Type Description
    Vector3

    PositionComponent

    The position to compare against. This will also set the forward for angle tie breaking.

    Declaration
    public Component PositionComponent { set; }
    Property Value
    Type Description
    Component

    PositionGameObject

    The position to compare against. This will also set the forward for angle tie breaking.

    Declaration
    public GameObject PositionGameObject { set; }
    Property Value
    Type Description
    GameObject

    PositionTransform

    The position to compare against. This will also set the forward for angle tie breaking.

    Declaration
    public Transform PositionTransform { set; }
    Property Value
    Type Description
    Transform

    Methods

    Compare(Component, Component)

    Compare the two instances.

    Declaration
    public int Compare(Component x, Component y)
    Parameters
    Type Name Description
    Component x

    The first instance.

    Component y

    The second instance.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    Compare(GameObject, GameObject)

    Compare the two instances.

    Declaration
    public int Compare(GameObject x, GameObject y)
    Parameters
    Type Name Description
    GameObject x

    The first instance.

    GameObject y

    The second instance.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    Compare(Transform, Transform)

    Compare the two instances.

    Declaration
    public int Compare(Transform x, Transform y)
    Parameters
    Type Name Description
    Transform x

    The first instance.

    Transform y

    The second instance.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    Compare(Vector2, Vector2)

    Compare the two instances.

    Declaration
    public int Compare(Vector2 x, Vector2 y)
    Parameters
    Type Name Description
    Vector2 x

    The first instance.

    Vector2 y

    The second instance.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    Compare(Vector3, Vector3)

    Compare the two instances.

    Declaration
    public int Compare(Vector3 x, Vector3 y)
    Parameters
    Type Name Description
    Vector3 x

    The first instance.

    Vector3 y

    The second instance.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Component, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Component x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Component x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Component, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Component x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Component x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Component, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Component x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Component x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Component, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Component x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Component x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Component, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Component x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Component x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, GameObject, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, GameObject x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    GameObject x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, GameObject, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, GameObject x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    GameObject x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, GameObject, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, GameObject x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    GameObject x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, GameObject, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, GameObject x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    GameObject x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, GameObject, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, GameObject x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    GameObject x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Transform, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Transform x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Transform x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Transform, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Transform x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Transform x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Transform, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Transform x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Transform x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Transform, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Transform x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Transform x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Transform, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Transform x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Transform x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Vector2, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Vector2 x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Vector2 x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Vector2, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Vector2 x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Vector2 x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Vector2, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Vector2 x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Vector2 x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Vector2, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Vector2 x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Vector2 x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Vector2, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Vector2 x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Vector2 x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Vector3, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Vector3 x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Vector3 x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Vector3, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Vector3 x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Vector3 x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Vector3, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Vector3 x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Vector3 x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Vector3, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Vector3 x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Vector3 x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Component, Vector3, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Component position, Vector3 x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    Vector3 x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Component, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Component x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Component x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Component, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Component x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Component x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Component, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Component x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Component x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Component, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Component x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Component x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Component, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Component x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Component x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, GameObject, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, GameObject x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    GameObject x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, GameObject, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, GameObject x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    GameObject x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, GameObject, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, GameObject x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    GameObject x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, GameObject, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, GameObject x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    GameObject x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, GameObject, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, GameObject x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    GameObject x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Transform, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Transform x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Transform x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Transform, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Transform x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Transform x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Transform, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Transform x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Transform x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Transform, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Transform x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Transform x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Transform, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Transform x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Transform x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Vector2, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Vector2 x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Vector2 x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Vector2, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Vector2 x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Vector2 x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Vector2, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Vector2 x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Vector2 x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Vector2, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Vector2 x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Vector2 x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Vector2, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Vector2 x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Vector2 x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Vector3, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Vector3 x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Vector3 x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Vector3, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Vector3 x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Vector3 x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Vector3, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Vector3 x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Vector3 x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Vector3, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Vector3 x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Vector3 x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(GameObject, Vector3, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(GameObject position, Vector3 x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    Vector3 x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Component, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Component x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Component x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Component, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Component x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Component x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Component, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Component x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Component x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Component, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Component x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Component x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Component, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Component x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Component x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, GameObject, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, GameObject x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    GameObject x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, GameObject, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, GameObject x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    GameObject x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, GameObject, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, GameObject x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    GameObject x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, GameObject, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, GameObject x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    GameObject x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, GameObject, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, GameObject x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    GameObject x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Transform, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Transform x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Transform x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Transform, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Transform x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Transform x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Transform, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Transform x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Transform x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Transform, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Transform x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Transform x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Transform, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Transform x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Transform x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Vector2, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Vector2 x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Vector2 x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Vector2, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Vector2 x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Vector2 x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Vector2, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Vector2 x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Vector2 x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Vector2, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Vector2 x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Vector2 x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Vector2, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Vector2 x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Vector2 x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Vector3, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Vector3 x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Vector3 x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Vector3, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Vector3 x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Vector3 x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Vector3, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Vector3 x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Vector3 x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Vector3, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Vector3 x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Vector3 x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Transform, Vector3, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Transform position, Vector3 x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    Vector3 x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Component, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Component x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Component x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Component, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Component x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Component x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Component, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Component x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Component x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Component, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Component x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Component x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Component, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Component x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Component x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, GameObject, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, GameObject x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    GameObject x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, GameObject, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, GameObject x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    GameObject x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, GameObject, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, GameObject x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    GameObject x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, GameObject, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, GameObject x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    GameObject x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, GameObject, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, GameObject x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    GameObject x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Transform, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Transform x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Transform x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Transform, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Transform x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Transform x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Transform, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Transform x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Transform x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Transform, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Transform x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Transform x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Transform, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Transform x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Transform x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Vector2, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Vector2 x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Vector2 x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Vector2, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Vector2 x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Vector2 x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Vector2, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Vector2 x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Vector2 x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Vector2, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Vector2 x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Vector2 x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Vector2, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Vector2 x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Vector2 x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Vector3, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Vector3 x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Vector3 x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Vector3, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Vector3 x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Vector3 x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Vector3, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Vector3 x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Vector3 x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Vector3, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Vector3 x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Vector3 x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector2, Vector3, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector2 position, Vector3 x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    Vector3 x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Component, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Component x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Component x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Component, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Component x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Component x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Component, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Component x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Component x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Component, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Component x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Component x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Component, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Component x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Component x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, GameObject, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, GameObject x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    GameObject x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, GameObject, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, GameObject x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    GameObject x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, GameObject, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, GameObject x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    GameObject x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, GameObject, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, GameObject x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    GameObject x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, GameObject, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, GameObject x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    GameObject x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Transform, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Transform x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Transform x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Transform, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Transform x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Transform x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Transform, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Transform x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Transform x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Transform, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Transform x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Transform x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Transform, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Transform x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Transform x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Vector2, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Vector2 x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Vector2 x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Vector2, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Vector2 x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Vector2 x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Vector2, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Vector2 x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Vector2 x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Vector2, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Vector2 x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Vector2 x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Vector2, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Vector2 x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Vector2 x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Vector3, Component, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Vector3 x, Component y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Vector3 x

    The first instance.

    Component y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Vector3, GameObject, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Vector3 x, GameObject y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Vector3 x

    The first instance.

    GameObject y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Vector3, Transform, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Vector3 x, Transform y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Vector3 x

    The first instance.

    Transform y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Vector3, Vector2, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Vector3 x, Vector2 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Vector3 x

    The first instance.

    Vector2 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    CompareDistance(Vector3, Vector3, Vector3, Boolean)

    Compare the two instances.

    Declaration
    public static int CompareDistance(Vector3 position, Vector3 x, Vector3 y, bool farthest = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    Vector3 x

    The first instance.

    Vector3 y

    The second instance.

    System.Boolean farthest

    If this should sort by farthest items first.

    Returns
    Type Description
    System.Int32

    Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first.

    Set(Component, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)

    Set values for the sorter.

    Declaration
    public void Set(Component position, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
    Parameters
    Type Name Description
    Component position

    The position to compare against.

    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.

    Set(GameObject, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)

    Set values for the sorter.

    Declaration
    public void Set(GameObject position, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
    Parameters
    Type Name Description
    GameObject position

    The position to compare against.

    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.

    Set(Transform, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)

    Set values for the sorter.

    Declaration
    public void Set(Transform position, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
    Parameters
    Type Name Description
    Transform position

    The position to compare against.

    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.

    Set(Vector2, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)

    Set values for the sorter.

    Declaration
    public void Set(Vector2 position, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
    Parameters
    Type Name Description
    Vector2 position

    The position to compare against.

    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.

    Set(Vector3, Boolean, Nullable<KaijuAngleSortMode>, Nullable<Vector2>)

    Set values for the sorter.

    Declaration
    public void Set(Vector3 position, bool farthest = false, KaijuAngleSortMode? mode = null, Vector2? forward = null)
    Parameters
    Type Name Description
    Vector3 position

    The position to compare against.

    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.

    Operators

    Implicit(KaijuAgentsDistanceSorter to Nullable<Vector2>)

    Implicit conversion to a nullable Vector2 from the position.

    Declaration
    public static implicit operator Vector2? (KaijuAgentsDistanceSorter s)
    Parameters
    Type Name Description
    KaijuAgentsDistanceSorter s

    The sorter.

    Returns
    Type Description
    System.Nullable<Vector2>

    The string from the KaijuSolutions.Agents.Extensions.KaijuAgentsDistanceSorter.ToString method.

    Implicit(KaijuAgentsDistanceSorter to Nullable<Vector3>)

    Implicit conversion to a nullable Vector3 from the position.

    Declaration
    public static implicit operator Vector3? (KaijuAgentsDistanceSorter s)
    Parameters
    Type Name Description
    KaijuAgentsDistanceSorter s

    The sorter.

    Returns
    Type Description
    System.Nullable<Vector3>

    The string from the KaijuSolutions.Agents.Extensions.KaijuAgentsDistanceSorter.ToString method.

    Implicit(KaijuAgentsDistanceSorter to String)

    Implicit conversion to a string.

    Declaration
    public static implicit operator string (KaijuAgentsDistanceSorter s)
    Parameters
    Type Name Description
    KaijuAgentsDistanceSorter s

    The sorter.

    Returns
    Type Description
    System.String

    The string from the KaijuSolutions.Agents.Extensions.KaijuAgentsDistanceSorter.ToString method.

    Implicit(KaijuAgentsDistanceSorter to Vector2)

    Implicit conversion to a Vector2 from the position.

    Declaration
    public static implicit operator Vector2(KaijuAgentsDistanceSorter s)
    Parameters
    Type Name Description
    KaijuAgentsDistanceSorter s

    The sorter.

    Returns
    Type Description
    Vector2

    The string from the KaijuSolutions.Agents.Extensions.KaijuAgentsDistanceSorter.ToString method.

    Implicit(KaijuAgentsDistanceSorter to Vector3)

    Implicit conversion to a Vector3 from the position.

    Declaration
    public static implicit operator Vector3(KaijuAgentsDistanceSorter s)
    Parameters
    Type Name Description
    KaijuAgentsDistanceSorter s

    The sorter.

    Returns
    Type Description
    Vector3

    The string from the KaijuSolutions.Agents.Extensions.KaijuAgentsDistanceSorter.ToString method.

    Implements

    System.Collections.Generic.IComparer<T>
    System.Collections.Generic.IComparer<T>
    System.Collections.Generic.IComparer<T>
    System.Collections.Generic.IComparer<T>
    System.Collections.Generic.IComparer<T>
    In This Article
    Back to top MIT License © 2026 Kaiju Solutions Inc.