Class TerrainPaintUtility
Inheritance
TerrainPaintUtility
Assembly: UnityEngine.dll
Syntax
public static class TerrainPaintUtility
Methods
|
Improve this Doc
View Source
BeginPaintHeightmap(Terrain, Rect, Int32)
Declaration
public static PaintContext BeginPaintHeightmap(Terrain terrain, Rect boundsInTerrainSpace, int extraBorderPixels = 0)
Parameters
Type |
Name |
Description |
Terrain |
terrain |
|
Rect |
boundsInTerrainSpace |
|
Int32 |
extraBorderPixels |
|
Returns
|
Improve this Doc
View Source
BeginPaintTexture(Terrain, Rect, TerrainLayer, Int32)
Declaration
public static PaintContext BeginPaintTexture(Terrain terrain, Rect boundsInTerrainSpace, TerrainLayer inputLayer, int extraBorderPixels = 0)
Parameters
Returns
|
Improve this Doc
View Source
BuildTransformPaintContextUVToPaintContextUV(PaintContext, PaintContext, out Vector4)
Declaration
public static void BuildTransformPaintContextUVToPaintContextUV(PaintContext src, PaintContext dst, out Vector4 scaleOffset)
Parameters
|
Improve this Doc
View Source
Declaration
public static BrushTransform CalculateBrushTransform(Terrain terrain, Vector2 brushCenterTerrainUV, float brushSize, float brushRotationDegrees)
Parameters
Returns
|
Improve this Doc
View Source
CollectNormals(Terrain, Rect, Int32)
Declaration
public static PaintContext CollectNormals(Terrain terrain, Rect boundsInTerrainSpace, int extraBorderPixels = 0)
Parameters
Type |
Name |
Description |
Terrain |
terrain |
|
Rect |
boundsInTerrainSpace |
|
Int32 |
extraBorderPixels |
|
Returns
|
Improve this Doc
View Source
EndPaintHeightmap(PaintContext, String)
Declaration
public static void EndPaintHeightmap(PaintContext ctx, string editorUndoName)
Parameters
|
Improve this Doc
View Source
EndPaintTexture(PaintContext, String)
Declaration
public static void EndPaintTexture(PaintContext ctx, string editorUndoName)
Parameters
|
Improve this Doc
View Source
FindTerrainLayerIndex(Terrain, TerrainLayer)
Declaration
public static int FindTerrainLayerIndex(Terrain terrain, TerrainLayer inputLayer)
Parameters
Returns
|
Improve this Doc
View Source
GetBlitMaterial()
Declaration
public static Material GetBlitMaterial()
Returns
|
Improve this Doc
View Source
GetBuiltinPaintMaterial()
Declaration
public static Material GetBuiltinPaintMaterial()
Returns
|
Improve this Doc
View Source
GetCopyTerrainLayerMaterial()
Declaration
public static Material GetCopyTerrainLayerMaterial()
Returns
|
Improve this Doc
View Source
GetTerrainAlphaMapChecked(Terrain, Int32)
Declaration
public static Texture2D GetTerrainAlphaMapChecked(Terrain terrain, int mapIndex)
Parameters
Returns
|
Improve this Doc
View Source
ReleaseContextResources(PaintContext)
Declaration
public static void ReleaseContextResources(PaintContext ctx)
Parameters
|
Improve this Doc
View Source
SetupTerrainToolMaterialProperties(PaintContext, BrushTransform, Material)
Declaration
public static void SetupTerrainToolMaterialProperties(PaintContext paintContext, BrushTransform brushXform, Material material)
Parameters