I have a mesh with multiple materials and I am trying to get the material of the normal that gets hit by a raycast. I have searched everywhere online but I can’t seem to find a solution.
A normal is just the direction a surface is facing. As such, Normals don’t have materials.
You might just be mixing your terms up. I’m guessing you mean a Collider? Rays hit colliders, then as part of the hit info a normal is just extra data letting you figure out the facing of the part of the collider you hit.
If you want to find the material used on a renderer on the same object the ray hit, you can use collider.GetCompoment() to find the renderer, then “.material” will give you the material assigned to it.