Make player not be seen by AI, when player in foilage and shadows.

Hey guys, my team is currently making a games that is going to be a tactical 3rd person military shooter. How can we make our game so when the player is in pretty high tall foliage using the terrain editor to place the foliage like grass, or in the shadows not be spotted by the enemy AI?

Something seen in games like SOCOM US Navy Seals, and Splinter Cell.

Thanks in advance.

Ive never attempted this but i would create a game object (sphere maybe but no renderer) and set its collider as a trigger. set these objects in shadow or foilage areas and attach a script with ontriggerenter/exit that adjusts your players visibility variable. Could work for enemies too. Just a thought.