UnityEngine.DynamicGI.UpdateMaterials C# (CSharp) Method

UpdateMaterials() public static method

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

public static UpdateMaterials ( Terrain terrain, int x, int y, int width, int height ) : void
terrain Terrain The Terrain to use when searching for systems to update.
x int
y int
width int
height int
return void
        public static void UpdateMaterials(Terrain terrain, int x, int y, int width, int height)
        {
            if (terrain == null)
            {
                throw new ArgumentNullException("terrain");
            }
            if (terrain.terrainData == null)
            {
                throw new ArgumentException("Invalid terrainData.");
            }
            float alphamapWidth = terrain.terrainData.alphamapWidth;
            float alphamapHeight = terrain.terrainData.alphamapHeight;
            UpdateMaterialsForTerrain(terrain, new Rect(((float) x) / alphamapWidth, ((float) y) / alphamapHeight, ((float) width) / alphamapWidth, ((float) height) / alphamapHeight));
        }

Same methods

DynamicGI::UpdateMaterials ( Renderer renderer ) : void
DynamicGI::UpdateMaterials ( Terrain terrain ) : void