Find and replace material in Scene in editor in C#

I have an FBX model of a theatre I pulled in to Unity. I want to replace the materials used by the seat fabric, but there are hundreds of child renderers I have to go to, to swap them out manually.

I wrote a script to change the material, which does it like this:

[finding loop]
var materials = renderer.sharedMaterials;
materials = replacer.ReplacementMaterial;
renderer.sharedMaterials = materials;
The problem is that when it comes out, it is holding a reference to an instance of the replacement material, not the material itself. If I click on the material in the renderer, it doesn’t highlight the source material.
How can I change the material from an editor script when not playing.
- Thanks.

the easier way’s be just editing the materials texture and this’d affect all materials used in your seat