Finds the closest game object and stores it in a variable for later use.
The game object to measure distance from.
Filter by this Tag.
Store the closest object (or null if none found) in a variable.
Store the distance to the closest object (or float.infinity if none found) in variable.
Perform the action every frame.