Hello!
I’m planning a base defense game, and I would like to use both turrets and enemies as Game Objects.
But, I want the turrets to check every update step for the closer enemy.
I’ve heard that there’s Vector3.Distance to check, well, distances, but my question is: how to obtain the list of tagged/layered “enemies” in such a way that dont create new lists, as this distance check will happen every update step, inside every turret?
May someone help me?