Skip to content

mogoson/MGS.TerrainModifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

[TOC]

MGS.TerrainModifier

Summary

  • Unity Terrain modifier.

Environment

  • Unity 5.0 or above.
  • .Net Framework 3.5 or above.

Demand

  • Occasionally, you may encounter a catastrophic problem in Unity project, example the terrain has been brushed but the demand change to brush a river or basin on the original terrain. if the terrain was created base on height zero, the river or basin cannot be brushed in this case, because Unity does not allow any part of the terrain is brushed to be negative. therefore, we hope that we can modify the heightmap data to raise whole terrian to continue brush landforms.

Prerequisite

  • Unity provide the API(GetHeights and SetHeights methods of TerrainData class) to modify TerrainData.

Scheme

  • Create extend editor window, select target TerrainData file and set raise height value.
  • Add the raise height value to TerrainData heightmap.

Usage

  1. Find the menu item "Tool/Terrain Modifier" in Unity editor menu bar and click it or press key combination Alt+T to open the editor window.
  2. Set the target "Terrain Data" and "Raise Height".
  3. Click the "Modify" button to open the dialog and make your choice.

Warning

  1. "Modify" operate can not be recovered, make sure you have a backup of target terrain data.
  2. Don't set a negative value to the Raise Height unless you know the terrain data inside out.

Copyright © 2021 Mogoson. mogoson@outlook.com