Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


UpdateMaterials

Schedules an update of the albedo and emissive textures of a system that contains the renderer or the terrain.
Read time 2 minutesLast updated 2 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • 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()'.
public static void UpdateMaterials(Renderer renderer)

Parameters

renderer

The Renderer 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.

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()'.
public static void UpdateMaterials(Object renderer)

Parameters

renderer

The Renderer 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.

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)'.
public static void UpdateMaterials(Object renderer, int x, int y, int width, int height)

Parameters

renderer

The Renderer to use when searching for a system to update.



width


height

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.