Unity Engine documentationScript ReferenceUnity.U2D.PhysicsPhysicsQueryPhysicsQuery.WorldCastModeAllSortedReturn all the hits but also sort by ascending distance (closest first).Read time 1 minuteLast updated 12 days agoDefinition Type: Field Namespace: Unity.U2D.Physics Assembly: UnityEngine.PhysicsCore2DModule AllSorted = 2