Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
/// <Summary>
/// TerrainのHeightMapを初期化します。
/// </Summary>
void ResetHeightMap(TerrainGenerator generator)
int terrainSizeX = generator.terrainData.heightmapResolution;
int terrainSizeZ = generator.terrainData.heightmapResolution;
float[,] newHeightMap = new float[terrainSizeX, terrainSizeZ];
generator.terrainData.SetHeights(0, 0, newHeightMap);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment