Version: 2022.1

PaintContextConstructor

切换到手册
public PaintContext (Terrain terrain, RectInt pixelRect, int targetTextureWidth, int targetTextureHeight, bool sharedBoundaryTexel= true, bool fillOutsideTerrain= true);

参数

terrain 用于为此 PaintContext 定义地形空间的地形。
pixelRect 要在目标地形纹理中编辑的像素矩形。
targetTextureWidth 目标地形纹理的宽度(按照地形)。
targetTextureHeight 目标地形纹理的高度(按照地形)。
sharedBoundaryTexel Whether to stretch the Textures so that edge texels lie on the Terrain boundary, and are shared with connected Terrains.
fillOutsideTerrain Whether to fill empty space outside of the Terrain tiles with data from the nearest tile.

描述

创建新的 PaintContext,从而编辑 pixelRect 所定义区域中的地形上的目标纹理。

This constructor finds all Terrain tiles that touch the pixelRect, searching across adjacent connected Terrain tiles. It also calculates the relevant regions on each Terrain, as well as the transforms between them.

See Also: PaintContext.