Version: 2022.3
언어: 한국어

PaintContextConstructor

매뉴얼로 전환
public PaintContext (Terrain terrain, RectInt pixelRect, int targetTextureWidth, int targetTextureHeight, bool sharedBoundaryTexel= true, bool fillOutsideTerrain= true);

파라미터

terrain Terrain that defines terrain space for this PaintContext.
pixelRect Pixel rectangle to edit in the target terrain texture.
targetTextureWidth Width of the target terrain texture (per Terrain).
targetTextureHeight Height of the target terrain texture (per Terrain).
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.

설명

Creates a new PaintContext, to edit a target texture on a Terrain, in a region defined by 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.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961