From experience/data, what is the fastest way in Unity to find a specific object within a given radius, taking occlusion/collision by other objects into account? You can imagine many situations in which a simple Physics.OverlapSphere check will return incorrect results, i.e. a corridor shooter where the found objects are actually behind a wall. Figuring out their validity would require O(n) raycasts, which is potentially very slow.
Does Unity provide any built-in data structures like an octree that can be queried instead? Of course that octree would have to be constructed by taking static collisions into account.
If not, what’s the best solution for this problem?