My current method for choosing footstep sounds to play, is getting the tag of the object your foot's trigger entered. But this means I need tags for Dirt, Sand, Concrete, etc., etc. which is really cumbersome. It also won't work correctly if a place the player steps on has multiple textures on it, like a path through the woods that has dirt, stone, and mud on the same game object but in different spots.
Another method is to have a billion empty game objects named different things, placed throughout the map, and check distance among all of them with each step to determine which is closest to the player. But that seems costly.
Is there some way to check the polygon face directly beneath the player's foot, that it collides with, and get the material index of THAT face? If so, this would save a lot of hassles getting the correct footsteps to play automatically based on which textures I use in the game.