Is it possible to retain the target of a OverlapSphere?

I’d like to cancel an OverlapSphere after it detects an appropriate target and retain that target, but so far I haven’t really figured out if that’s possible or not.

		targetArray = Physics.OverlapSphere(transform.position, 3f);
			
		foreach(Collider obj in targetArray)
		{
			if (obj.tag == "ConvoyMember")
			{
				followTarget = obj.gameObject;
			
				CancelInvoke("changeDirection");
				transform.parent = null;				
				
			}
		}

The overlapShere gives you a list of what it hit. After that, the overlap sphere is done, out of the picture, and you’re just examining a boring list that could have been made by anyone.

So, the real question is “is it possible to quit a foreach loop early?”

Yes. Add the command break;. It pops you out of a loop.