How to detect if a point is underwater?

I’m trying to create randomly generated ai on a map, anything on land would be a land animal, anything underwater would be a fish. How do I determine if a point is under the waterplane or above it?

i guess u have to refer Island demo project , i m sure i hav seen something like this in tht…

if randomposition.y is smaller than waterplane.y then its underwater.

Do you have areas that are below the sea level but are on land? If not you could do a simple check on the Y axis.

Yep there are some areas below sea level, so any other way other than waterplane.y?

Assuming you have a few colliders or renderers defining water, you could iterate through them and check .bounds.Contains (pointYouNeedToCheck);

If you are randomly generating the positions, you could generate the initial positions up in the air and raycast down from that point. If the ray collides with water, then put a fish down there, and if not, then put a land animal?
That would assist in placing the animals on the ground or seafloor as well.