Cesium OSM buildings

If I add a cesium OSM layer to my terrain is there a way I could set the materials of each building using a script instead of having one material for all buildings?

If I’m understanding correctly, you want to set the material of each individual building, and not the tiles as a whole? That may not be possible, because many of these buildings are batched together in the same glTF model.

Perhaps with metadata styling, you could style the buildings differently based on their feature IDs. But unfortunately, Cesium for Unity does not support that yet.