Class PaintContext
Assembly: UnityEngine.dll
Syntax
public class PaintContext
Constructors
|
Improve this Doc
View Source
PaintContext(Terrain, RectInt, Int32, Int32)
Declaration
public PaintContext(Terrain terrain, RectInt pixelRect, int targetTextureWidth, int targetTextureHeight)
Parameters
Properties
|
Improve this Doc
View Source
destinationRenderTexture
Declaration
public RenderTexture destinationRenderTexture { get; }
Property Value
|
Improve this Doc
View Source
oldRenderTexture
Declaration
public RenderTexture oldRenderTexture { get; }
Property Value
|
Improve this Doc
View Source
originTerrain
Declaration
public Terrain originTerrain { get; }
Property Value
|
Improve this Doc
View Source
pixelRect
Declaration
public RectInt pixelRect { get; }
Property Value
|
Improve this Doc
View Source
pixelSize
Declaration
public Vector2 pixelSize { get; }
Property Value
|
Improve this Doc
View Source
sourceRenderTexture
Declaration
public RenderTexture sourceRenderTexture { get; }
Property Value
|
Improve this Doc
View Source
targetTextureHeight
Declaration
public int targetTextureHeight { get; }
Property Value
|
Improve this Doc
View Source
targetTextureWidth
Declaration
public int targetTextureWidth { get; }
Property Value
|
Improve this Doc
View Source
terrainCount
Declaration
public int terrainCount { get; }
Property Value
Methods
|
Improve this Doc
View Source
ApplyDelayedActions()
Declaration
public static void ApplyDelayedActions()
|
Improve this Doc
View Source
Cleanup(Boolean)
Declaration
public void Cleanup(bool restoreRenderTexture = true)
Parameters
Type |
Name |
Description |
Boolean |
restoreRenderTexture |
|
|
Improve this Doc
View Source
CreateFromBounds(Terrain, Rect, Int32, Int32, Int32)
Declaration
public static PaintContext CreateFromBounds(Terrain terrain, Rect boundsInTerrainSpace, int inputTextureWidth, int inputTextureHeight, int extraBorderPixels = 0)
Parameters
Type |
Name |
Description |
Terrain |
terrain |
|
Rect |
boundsInTerrainSpace |
|
Int32 |
inputTextureWidth |
|
Int32 |
inputTextureHeight |
|
Int32 |
extraBorderPixels |
|
Returns
|
Improve this Doc
View Source
CreateRenderTargets(RenderTextureFormat)
Declaration
public void CreateRenderTargets(RenderTextureFormat colorFormat)
Parameters
|
Improve this Doc
View Source
GatherAlphamap(TerrainLayer, Boolean)
Declaration
public void GatherAlphamap(TerrainLayer inputLayer, bool addLayerIfDoesntExist = true)
Parameters
|
Improve this Doc
View Source
GatherHeightmap()
Declaration
public void GatherHeightmap()
|
Improve this Doc
View Source
GatherNormals()
Declaration
public void GatherNormals()
|
Improve this Doc
View Source
GetClippedPixelRectInRenderTexturePixels(Int32)
Declaration
public RectInt GetClippedPixelRectInRenderTexturePixels(int terrainIndex)
Parameters
Type |
Name |
Description |
Int32 |
terrainIndex |
|
Returns
|
Improve this Doc
View Source
GetClippedPixelRectInTerrainPixels(Int32)
Declaration
public RectInt GetClippedPixelRectInTerrainPixels(int terrainIndex)
Parameters
Type |
Name |
Description |
Int32 |
terrainIndex |
|
Returns
|
Improve this Doc
View Source
GetTerrain(Int32)
Declaration
public Terrain GetTerrain(int terrainIndex)
Parameters
Type |
Name |
Description |
Int32 |
terrainIndex |
|
Returns
|
Improve this Doc
View Source
ScatterAlphamap(String)
Declaration
public void ScatterAlphamap(string editorUndoName)
Parameters
Type |
Name |
Description |
String |
editorUndoName |
|
|
Improve this Doc
View Source
ScatterHeightmap(String)
Declaration
public void ScatterHeightmap(string editorUndoName)
Parameters
Type |
Name |
Description |
String |
editorUndoName |
|
Extension Methods