static private UpdateMaterialsForTerrain ( |
||
terrain | ||
uvBounds | ||
return | void |
public static void UpdateMaterials(Terrain terrain) { if (terrain == null) { throw new ArgumentNullException("terrain"); } if (terrain.terrainData == null) { throw new ArgumentException("Invalid terrainData."); } DynamicGI.UpdateMaterialsForTerrain(terrain, new Rect(0f, 0f, 1f, 1f)); }
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 num = (float)terrain.terrainData.alphamapWidth; float num2 = (float)terrain.terrainData.alphamapHeight; DynamicGI.UpdateMaterialsForTerrain(terrain, new Rect((float)x / num, (float)y / num2, (float)width / num, (float)height / num2)); }