unity check if object is within radius code example
Example: unity how to check if a game object if with in a radius
if (Vector3.Distance (Object1.transform.position, Object2.transform.position) < 100)
{
//Do something because the distance is less than 100
}