For a game I'm currently working on, I need to retrieves every interactable object in a certain range from the player's camera.
There's two way that I can think of :
The first one seems really bad performance wise, since you could be retrieving quite a lot of objects, and you'd have to compute the distance every frame
The second one seems better, but it also means that anything entering the collider range will be tag-tested
The third one might be the best in my opinion, since interactable object won't move around the collision should only happen with the player / some moving objects
Considering the range is fairly large, which solution would be the most pertinent / easy on performances ?
Edit : The only resource I found seems to go towards the collision detection, but nothing to back the point of view of this guy => https://forum.unity.com/threads/find-object-with-tag-in-range.190938/