I’ve always used spherecasts for 3d environments but they dont seem to work in the new 2D environment. I’ve seen some examples of the new 2D spherecasting but can’t get it to work. Here’s my current code for my 3D spherecasting.
var hitColliders = Physics.OverlapSphere(this.transform.position, 10);
for (var i = 0; i < hitColliders.Length; i++) {
if(hitColliders*.gameObject.tag == "enemy") {*
_ hitColliders*.SendMessage(“test”);_
_}_
_}*_