Version: 2023.2

Graphics.DrawMeshInstancedIndirect

切换到手册
public static void DrawMeshInstancedIndirect (Mesh mesh, int submeshIndex, Material material, Bounds bounds, ComputeBuffer bufferWithArgs, int argsOffset= 0, MaterialPropertyBlock properties= null, Rendering.ShadowCastingMode castShadows= ShadowCastingMode.On, bool receiveShadows= true, int layer= 0, Camera camera= null, Rendering.LightProbeUsage lightProbeUsage= LightProbeUsage.BlendProbes, LightProbeProxyVolume lightProbeProxyVolume= null);
public static void DrawMeshInstancedIndirect (Mesh mesh, int submeshIndex, Material material, Bounds bounds, GraphicsBuffer bufferWithArgs, int argsOffset= 0, MaterialPropertyBlock properties= null, Rendering.ShadowCastingMode castShadows= ShadowCastingMode.On, bool receiveShadows= true, int layer= 0, Camera camera= null, Rendering.LightProbeUsage lightProbeUsage= LightProbeUsage.BlendProbes, LightProbeProxyVolume lightProbeProxyVolume= null);

参数

mesh 要绘制的 Mesh
submeshIndex 要绘制网格的哪个子集。这只适用于由若干种材质构成的网格。
material 要使用的 Material
bounds 围绕要绘制的实例的包围体。
bufferWithArgs GPU 缓冲区包含相应的参数,指示要绘制此网格的实例数。
argsOffset 缓冲区中的字节偏移,绘制参数起始位置。
properties 要应用的其他材质属性。请参阅 MaterialPropertyBlock
castShadows 确定网格是否可以投射阴影。
receiveShadows 确定网格是否可以接受阴影。
layer 要使用的 Layer
camera If null (default), the mesh will be drawn in all cameras. Otherwise it will be drawn in the given Camera only.
lightProbeUsage 实例的 LightProbeUsage

描述

This function is now obsolete. Use