Internal_DrawMeshInstancedList() private method

private Internal_DrawMeshInstancedList ( Mesh mesh, int submeshIndex, Material material, object matrixList, MaterialPropertyBlock properties, ShadowCastingMode castShadows, bool receiveShadows, int layer, Camera camera ) : void
mesh Mesh
submeshIndex int
material Material
matrixList object
properties MaterialPropertyBlock
castShadows ShadowCastingMode
receiveShadows bool
layer int
camera Camera
return void
Exemplo n.º 1
0
 public static void DrawMeshInstanced(Mesh mesh, int submeshIndex, Material material, List <Matrix4x4> matrices, [UnityEngine.Internal.DefaultValue("null")] MaterialPropertyBlock properties, [UnityEngine.Internal.DefaultValue("ShadowCastingMode.On")] ShadowCastingMode castShadows, [UnityEngine.Internal.DefaultValue("true")] bool receiveShadows, [UnityEngine.Internal.DefaultValue("0")] int layer, [UnityEngine.Internal.DefaultValue("null")] Camera camera)
 {
     if (!SystemInfo.supportsInstancing)
     {
         throw new InvalidOperationException("Instancing is not supported.");
     }
     if (mesh == null)
     {
         throw new ArgumentNullException("mesh");
     }
     if (submeshIndex < 0 || submeshIndex >= mesh.subMeshCount)
     {
         throw new ArgumentOutOfRangeException("submeshIndex", "submeshIndex out of range.");
     }
     if (material == null)
     {
         throw new ArgumentNullException("material");
     }
     if (matrices == null)
     {
         throw new ArgumentNullException("matrices");
     }
     if (matrices.Count > Graphics.kMaxDrawMeshInstanceCount)
     {
         throw new ArgumentOutOfRangeException("matrices", string.Format("Matrix list count must be in the range of 0 to {0}.", Graphics.kMaxDrawMeshInstanceCount));
     }
     if (matrices.Count > 0)
     {
         Graphics.Internal_DrawMeshInstancedList(mesh, submeshIndex, material, matrices, properties, castShadows, receiveShadows, layer, camera);
     }
 }