Show / Hide Table of Contents

Class RaycastHitExtensions

RaycastHit extension methods.

Inheritance
System.Object
RaycastHitExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GlitchedPolygons.ExtensionMethods
Assembly: UnityScriptsLibrary.dll
Syntax
public static class RaycastHitExtensions

Methods

| Improve this Doc View Source

SortByDistance(RaycastHit[], Boolean)

Sort this RaycastHit[] array by RaycastHit.distance.

Also supports arrays from the Physics.RaycastNonAlloc methods (the ones with some empty RaycastHit variables in them).

Declaration
public static void SortByDistance(this RaycastHit[] hits, bool raycastNonAlloc)
Parameters
Type Name Description
RaycastHit[] hits

The RaycastHits array to sort.

System.Boolean raycastNonAlloc

Does this array come from a RaycastNonAlloc method?

  • Improve this Doc
  • View Source
Back to top Generated by DocFX