Class TerrainData
Assembly: UnityEngine.dll
Syntax
public sealed class TerrainData : Object
Constructors
|
Improve this Doc
View Source
TerrainData()
Declaration
Properties
|
Improve this Doc
View Source
alphamapHeight
Declaration
public int alphamapHeight { get; }
Property Value
alphamapLayers
Declaration
public int alphamapLayers { get; }
Property Value
|
Improve this Doc
View Source
alphamapResolution
Declaration
public int alphamapResolution { get; set; }
Property Value
alphamapTextureCount
Declaration
public int alphamapTextureCount { get; }
Property Value
|
Improve this Doc
View Source
alphamapTextures
Declaration
public Texture2D[] alphamapTextures { get; }
Property Value
|
Improve this Doc
View Source
alphamapWidth
Declaration
public int alphamapWidth { get; }
Property Value
|
Improve this Doc
View Source
baseMapResolution
Declaration
public int baseMapResolution { get; set; }
Property Value
bounds
Declaration
public Bounds bounds { get; }
Property Value
detailHeight
Declaration
public int detailHeight { get; }
Property Value
detailPatchCount
Declaration
public int detailPatchCount { get; }
Property Value
detailPrototypes
Declaration
public DetailPrototype[] detailPrototypes { get; set; }
Property Value
detailResolution
Declaration
public int detailResolution { get; }
Property Value
detailResolutionPerPatch
Declaration
public int detailResolutionPerPatch { get; }
Property Value
detailWidth
Declaration
public int detailWidth { get; }
Property Value
heightmapHeight
Declaration
public int heightmapHeight { get; }
Property Value
|
Improve this Doc
View Source
heightmapResolution
Declaration
public int heightmapResolution { get; set; }
Property Value
heightmapScale
Declaration
public Vector3 heightmapScale { get; }
Property Value
heightmapTexture
Declaration
public RenderTexture heightmapTexture { get; }
Property Value
heightmapWidth
Declaration
public int heightmapWidth { get; }
Property Value
size
Declaration
public Vector3 size { get; set; }
Property Value
splatPrototypes
Declaration
[Obsolete("Please use the terrainLayers API instead.", false)]
public SplatPrototype[] splatPrototypes { get; set; }
Property Value
terrainLayers
Declaration
public TerrainLayer[] terrainLayers { get; set; }
Property Value
thickness
Declaration
public float thickness { get; set; }
Property Value
treeInstanceCount
Declaration
public int treeInstanceCount { get; }
Property Value
|
Improve this Doc
View Source
treeInstances
Declaration
public TreeInstance[] treeInstances { get; set; }
Property Value
treePrototypes
Declaration
public TreePrototype[] treePrototypes { get; set; }
Property Value
wavingGrassAmount
Declaration
public float wavingGrassAmount { get; set; }
Property Value
wavingGrassSpeed
Declaration
public float wavingGrassSpeed { get; set; }
Property Value
wavingGrassStrength
Declaration
public float wavingGrassStrength { get; set; }
Property Value
wavingGrassTint
Declaration
public Color wavingGrassTint { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
GetAlphamaps(Int32, Int32, Int32, Int32)
Declaration
public float[,, ] GetAlphamaps(int x, int y, int width, int height)
Parameters
Returns
GetAlphamapTexture(Int32)
Declaration
public Texture2D GetAlphamapTexture(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
GetDetailLayer(Int32, Int32, Int32, Int32, Int32)
Declaration
public int[, ] GetDetailLayer(int xBase, int yBase, int width, int height, int layer)
Parameters
Returns
Type |
Description |
Int32[,] |
|
GetHeight(Int32, Int32)
Declaration
public float GetHeight(int x, int y)
Parameters
Returns
|
Improve this Doc
View Source
GetHeights(Int32, Int32, Int32, Int32)
Declaration
public float[, ] GetHeights(int xBase, int yBase, int width, int height)
Parameters
Returns
GetInterpolatedHeight(Single, Single)
Declaration
public float GetInterpolatedHeight(float x, float y)
Parameters
Returns
GetInterpolatedNormal(Single, Single)
Declaration
public Vector3 GetInterpolatedNormal(float x, float y)
Parameters
Returns
GetMaximumHeightError()
Declaration
public float[] GetMaximumHeightError()
Returns
GetPatchMinMaxHeights()
Declaration
public PatchExtents[] GetPatchMinMaxHeights()
Returns
GetSteepness(Single, Single)
Declaration
public float GetSteepness(float x, float y)
Parameters
Returns
GetSupportedLayers(Int32, Int32, Int32, Int32)
Declaration
public int[] GetSupportedLayers(int xBase, int yBase, int totalWidth, int totalHeight)
Parameters
Returns
|
Improve this Doc
View Source
GetTreeInstance(Int32)
Declaration
public TreeInstance GetTreeInstance(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
OverrideMaximumHeightError(Single[])
Declaration
public void OverrideMaximumHeightError(float[] maxError)
Parameters
Type |
Name |
Description |
Single[] |
maxError |
|
OverrideMinMaxPatchHeights(PatchExtents[])
Declaration
public void OverrideMinMaxPatchHeights(PatchExtents[] minMaxHeights)
Parameters
RefreshPrototypes()
Declaration
public void RefreshPrototypes()
|
Improve this Doc
View Source
SetAlphamaps(Int32, Int32, Single[,,])
Declaration
public void SetAlphamaps(int x, int y, float[,, ] map)
Parameters
SetBaseMapDirty()
Declaration
public void SetBaseMapDirty()
|
Improve this Doc
View Source
SetDetailLayer(Int32, Int32, Int32, Int32[,])
Declaration
public void SetDetailLayer(int xBase, int yBase, int layer, int[, ] details)
Parameters
|
Improve this Doc
View Source
SetDetailResolution(Int32, Int32)
Declaration
public void SetDetailResolution(int detailResolution, int resolutionPerPatch)
Parameters
Type |
Name |
Description |
Int32 |
detailResolution |
|
Int32 |
resolutionPerPatch |
|
|
Improve this Doc
View Source
SetHeights(Int32, Int32, Single[,])
Declaration
public void SetHeights(int xBase, int yBase, float[, ] heights)
Parameters
|
Improve this Doc
View Source
SetHeightsDelayLOD(Int32, Int32, Single[,])
Declaration
public void SetHeightsDelayLOD(int xBase, int yBase, float[, ] heights)
Parameters
SetTreeInstance(Int32, TreeInstance)
Declaration
public void SetTreeInstance(int index, TreeInstance instance)
Parameters
UpdateDirtyRegion(Int32, Int32, Int32, Int32, Boolean)
Declaration
public void UpdateDirtyRegion(int x, int y, int width, int height, bool syncHeightmapTextureImmediately)
Parameters
Extension Methods