- I want to make our terrain tools run at an interactive speed.
You have implemented some in-house terrain forming tools, but applying any changes to a terrain results in a dramatic drop in performance making them barely usable.
When creating you own terrain editing tools, TerrainData.SetHeights is naturally slower. This is because it needs to recalculate all the terrain LOD information, which is done on every call to SetHeights.
A patch was released for 5.2.0a3 where the SetHeightsDelayedLOD API was introduced to improve the speed at which TerrainData.SetHeights recalculates the LOD information.
In this patch release, the Editor uses two internal functions:
With SetHeightDelayedLOD(), the LOD calculation can be skipped or delayed while editing, and is triggered once the mouse button is released.
For more information on TerrainData.SetHeights see this document here.
Go here to download the relevant patch where this SetHeightsDelayedLOD API has been implemented.