How to remove closest game object?

i have 3 game objects with tag “Obj” how to remove closest of them from else game Object?


get a hold of all the objects you are interested in. you can do this either by finding them all, or by a sphereCast

then taking the distance of each 1 to determine which one is closest