Show / Hide Table of Contents

Class PaintContext

Inheritance
Object
PaintContext
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine.Experimental.TerrainAPI
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
Type Name Description
Terrain terrain
RectInt pixelRect
Int32 targetTextureWidth
Int32 targetTextureHeight

Properties

| Improve this Doc View Source

destinationRenderTexture

Declaration
public RenderTexture destinationRenderTexture { get; }
Property Value
Type Description
RenderTexture
| Improve this Doc View Source

oldRenderTexture

Declaration
public RenderTexture oldRenderTexture { get; }
Property Value
Type Description
RenderTexture
| Improve this Doc View Source

originTerrain

Declaration
public Terrain originTerrain { get; }
Property Value
Type Description
Terrain
| Improve this Doc View Source

pixelRect

Declaration
public RectInt pixelRect { get; }
Property Value
Type Description
RectInt
| Improve this Doc View Source

pixelSize

Declaration
public Vector2 pixelSize { get; }
Property Value
Type Description
Vector2
| Improve this Doc View Source

sourceRenderTexture

Declaration
public RenderTexture sourceRenderTexture { get; }
Property Value
Type Description
RenderTexture
| Improve this Doc View Source

targetTextureHeight

Declaration
public int targetTextureHeight { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

targetTextureWidth

Declaration
public int targetTextureWidth { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

terrainCount

Declaration
public int terrainCount { get; }
Property Value
Type Description
Int32

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
Type Description
PaintContext
| Improve this Doc View Source

CreateRenderTargets(RenderTextureFormat)

Declaration
public void CreateRenderTargets(RenderTextureFormat colorFormat)
Parameters
Type Name Description
RenderTextureFormat colorFormat
| Improve this Doc View Source

GatherAlphamap(TerrainLayer, Boolean)

Declaration
public void GatherAlphamap(TerrainLayer inputLayer, bool addLayerIfDoesntExist = true)
Parameters
Type Name Description
TerrainLayer inputLayer
Boolean addLayerIfDoesntExist
| 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
Type Description
RectInt
| Improve this Doc View Source

GetClippedPixelRectInTerrainPixels(Int32)

Declaration
public RectInt GetClippedPixelRectInTerrainPixels(int terrainIndex)
Parameters
Type Name Description
Int32 terrainIndex
Returns
Type Description
RectInt
| Improve this Doc View Source

GetTerrain(Int32)

Declaration
public Terrain GetTerrain(int terrainIndex)
Parameters
Type Name Description
Int32 terrainIndex
Returns
Type Description
Terrain
| 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

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX