Changing Textures of a complex model In Script

So, lets say I have a model like a bed with a brown wooden frame, a white bedsheet and black bedhead. I want to allow the player to select a part of the bed and then choose a texture to replace it. I’ve seen some answers where it’s a simple object but what about when it’s multiple parts of a model.

Edit: The player is also dragging and dropping the bed into the room, then he can change the texture when it’s in the room.

you’ve probably seen examples using “GetComponent().material” you should be aware that there is also “GetComponent().materials” which returns all the materials on the object, same for sharedMaterial and sharedMaterials.

Ok thanks, I’ll check it out and for that other post, that was an accident and I have no clue how to delete it. My bad.