RaycastHit.collider Manual     Reference     Scripting  
Scripting > Runtime Classes > RaycastHit
RaycastHit.collider

var collider : Collider

Description

The Collider that was hit.

This property is null if hit nothing and not-null if you hit anything. See Also: Physics.Raycast, Physics.Linecast, Physics.RaycastAll.