Experimental: this API is experimental and might be changed or removed in the future.

TerrainPaintUtilityEditor.DrawBrushPreview

Cambiar al Manual
public static void DrawBrushPreview (Experimental.TerrainAPI.PaintContext heightmapPC, Experimental.TerrainAPI.TerrainPaintUtilityEditor.BrushPreview previewTexture, Texture brushTexture, Experimental.TerrainAPI.BrushTransform brushXform, Material proceduralMaterial, int materialPassIndex);

Parámetros

heightmapPCPaintContext describing the heightmap from which to build the preview mesh.
previewTextureSpecifies Whether to build the mesh using the source or destination render texture in heightmapPC.
brushTextureThe brush texture to preview.
brushXformDescribes the position and orientation of the brush.
proceduralMaterialMaterial used to render the preview.
materialPassIndexMaterial pass to render.

Descripción

Draws a Terrain brush preview mesh from a heightmap PaintContext using the provided procedural material.

The heightmapPC is used to build the mesh. To ensure that the preview is rendered on the mesh, the heightmapPC must contain an area around the brush. To facilitate proper transformation of brush UV space, this method sets up the brush transforms in the material. Important: The material provided must support procedural mesh generation in the vertex shader using the shader functions provided in TerrainPreview.cginc. A default implementation of the material is provided by GetDefaultBrushPreviewMaterial().

See Also: TerrainPaintUtilityEditor.GetDefaultBrushPreviewMaterial and PaintContext.

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