How to check what material player stand on.

I want do display foot step according to what kind of material player is stand on.
We have terrain with different texture layer and mesh with different materials.
How to do this in unity.
Thanks

I’d recommend attaching a MeshCollider to the character and terrain. Then you can check on the OnTriggerEnter() if the collision the character encountered was with the terrain. If yes, you can check for the components of the terrain GameObject to see what texture is attached to it. Then you can instantiate the corresponding footsteps.