If your grids are stationary and of equal sizes (like 32x32) then you can just calculate the grid number by using “Divide” nodes for the floats representing x and y locations. It’s much faster than using loops.
It seems to me like those iterations cost most of your performance.
I can think of two solutions. Either you use a static grid system (based on coordinates) or a system where the player can only place towers on pre defined places which are their own actor.
In the latter case you simply create an actor and check with a trace which one you’re hovering over and display whatever there.
If you want to use the coordinates system you could take a look at this project:
It got a pretty good solution for this if you want to check it out. It’s using a static grid simply by X and Y values. (Just in case you want to check it out
I’ve used it myself in a TowerDefense sideproject of mine and it works great!