private void SetMaterial(MapLayer mapLayer, Material mat) { mapLayer.GetComponent <MeshRenderer>().material = mat; }