Skip to content

Instantly share code, notes, and snippets.

@kaorun55
Created May 18, 2016 15:57
Show Gist options
  • Save kaorun55/cd04c870cce5a35dca3a5d3ab7404f57 to your computer and use it in GitHub Desktop.
Save kaorun55/cd04c870cce5a35dca3a5d3ab7404f57 to your computer and use it in GitHub Desktop.
public void SetMaterial(Material mat)
{
DrawMaterial = mat;
foreach (var surface in surfaces)
{
surface.Value.GetComponent<MeshRenderer>().sharedMaterial = mat;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment