For people having trouble with that, here’s what I ended up with for the object collision scripts.
Color wallBrown = new Color(55f/255f, 31f/255f, 0f);
private void OnCollisionEnter(Collision other)
{
GetComponent<MeshRenderer>().material.color = Color.red;
}
private void OnCollisionExit(Collision other)
{
GetComponent<MeshRenderer>().material.color = wallBrown;
}