# Sandbox.MeshComponent.SetMaterial

```csharp
void SetMaterial(Material material, int triangle)
```

### Parameters

- `material` (`Material`)
- `triangle` (`int`)

Declared in [Sandbox.MeshComponent](/api/Sandbox.MeshComponent).
Assembly: `Sandbox.Engine`.
