# UpdateMaterials

> Schedules an update of the albedo and emissive textures of a system that contains the renderer or the terrain.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.5/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## UpdateMaterials(Renderer)

Schedules an update of the albedo and emissive textures of a system that contains the renderer or the terrain.

> **Warning:**
>
> **Removed.** DynamicGI.UpdateMaterials(Renderer) is deprecated; instead, use extension method from RendererExtensions: 'renderer.UpdateGIMaterials()'.

```csharp
public static void UpdateMaterials(Renderer renderer)
```

### Parameters

**** (\[Renderer]\(/engine/6000.5/script-reference/unityengine/renderer)): The [Renderer](/engine/6000.5/script-reference/unityengine/renderer.md) to use when searching for a system to update.

### Remarks

The third overload specifies a region of the terrain that needs to be updated. This makes sure that only the systems that overlap with the specified rectangle get updated, which could help improve performance. The coordinates are specified the same way as in [TerrainData.SetAlphamaps](/engine/6000.5/script-reference/unityengine/terraindata/setalphamaps.md).

## UpdateMaterials(Object)

Schedules an update of the albedo and emissive textures of a system that contains the renderer or the terrain.

> **Warning:**
>
> **Removed.** DynamicGI.UpdateMaterials(Terrain) is deprecated; instead, use extension method from TerrainExtensions: 'terrain.UpdateGIMaterials()'.

```csharp
public static void UpdateMaterials(Object renderer)
```

### Parameters

**** (\[Object]\(/engine/6000.5/script-reference/unityengine/object)): The [Renderer](/engine/6000.5/script-reference/unityengine/renderer.md) to use when searching for a system to update.

### Remarks

The third overload specifies a region of the terrain that needs to be updated. This makes sure that only the systems that overlap with the specified rectangle get updated, which could help improve performance. The coordinates are specified the same way as in [TerrainData.SetAlphamaps](/engine/6000.5/script-reference/unityengine/terraindata/setalphamaps.md).

## UpdateMaterials(Object, int, int, int, int)

Schedules an update of the albedo and emissive textures of a system that contains the renderer or the terrain.

> **Warning:**
>
> **Removed.** DynamicGI.UpdateMaterials(Terrain, int, int, int, int) is deprecated; instead, use extension method from TerrainExtensions: 'terrain.UpdateGIMaterials(x, y, width, height)'.

```csharp
public static void UpdateMaterials(Object renderer, int x, int y, int width, int height)
```

### Parameters

**** (\[Object]\(/engine/6000.5/script-reference/unityengine/object)): The [Renderer](/engine/6000.5/script-reference/unityengine/renderer.md) to use when searching for a system to update.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)):&#x20;

### Remarks

The third overload specifies a region of the terrain that needs to be updated. This makes sure that only the systems that overlap with the specified rectangle get updated, which could help improve performance. The coordinates are specified the same way as in [TerrainData.SetAlphamaps](/engine/6000.5/script-reference/unityengine/terraindata/setalphamaps.md).
