Strategy Line of Sight

I am working on a prototype for a strategy game, I need the units to have line of sight as there are objects in the world that can obscure their view. All units can move 8 directions but only face 2 directions. I was trying to make it so that for each instance of the unit, every 0.25 seconds they would cast rays every 10 degrees the direction they are facing. It seems that they only perceive an enemy unit when they are very close even though I have the max range set to 100,000 pixels. Anyone know how I can do this better?

Can you share your ray cast events? Are you using for each object?

here, I am trying to do it differently now by just going from unit to unit with the cast, but it doesn’t seem to work still, now it seems to be ignoring obstacles?