Getting to the material from a Raycast hit

I have a bullet and a collision is detected when it hits an object in the room. Using OnTriggerEnter I am passed a Collider “hit”. I just want to affect the game object in some way so I’m exploring which components I can get to from there. These is a material on the hit object but it seems to be a physics material so for instance I don’t see a color property (if I wanted to change the color).

At the moment I printed hit.name and I’m about to test hit.gameObject.name

Am I misunderstanding how this works?

Ah, I think I seethe collider only has a physics material. I think I need to get the renderer and from there I can get the materials. I THINK :slight_smile:

Looks like I thought correctly. It works.