CreateFromConnectedNeighbors(Terrain, Predicate<Terrain>, bool)
Creates a TerrainMap from the neighbors connected to the origin Terrain.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEngine.TerrainUtils
- Assembly: UnityEngine.TerrainModule
public static TerrainMap CreateFromConnectedNeighbors(Terrain originTerrain, Predicate<Terrain> filter = null, bool fullValidation = true)
Parameters
Terrain that is given tile coordinate (0,0).
Filter to apply when populating the map. If null, no filter is applied.
Validate the Terrain map. Default is true.
Returns
Type | Description |
|---|---|
| TerrainMap | The resulting Terrain map. Can return null when no Terrain objects pass the filter. |
Remarks
Creates a TerrainMap of all the Terrain neighbors connected to the origin Terrain that pass the filter validation.