Checking for light on character

Hey!

Having issues trying to figure this out myself. The game I’m creating has pockets of light as safe zones. When in these zones enemies should not chase the player and they should stop where they are at until the player exits a lighted zone and enters the darkness. Is there a way to check how much light is being cast on a character and then tell the enemies to stop moving. Or is there a different more appropriate way to achieve the same outcome.

Thanks Guys/Gals!!!

I would suggest you add a sphere collider to each light and set it as a trigger, then in a script on the player you have an OnTriggerEnter and OnTriggerExit function which broadcasts an event to nearby enemies what behaviour they should perform.