Version: 2023.2
public void DrawMesh (Mesh mesh, Matrix4x4 matrix, Material material, int submeshIndex= 0, int shaderPass= -1, MaterialPropertyBlock properties= null);

参数

mesh 要绘制的网格。
matrix 要使用的变换矩阵。
material 要使用的材质。
submeshIndex 要渲染网格的哪个子集。
shaderPass 要使用着色器的哪个通道(默认为 -1,表示渲染所有通道)。
properties Additional Material properties to apply onto the Material just before this Mesh is drawn. See MaterialPropertyBlock.

描述

添加“绘制网格”命令。

Note that the rendered mesh will not have any lighting related shader data (light colors, directions, shadows, light and reflection probes etc.) set up. If the shader used by the material uses any lighting related variables, the results are undefined.

另请参阅:DrawRendererMaterialPropertyBlock