Ejemplo n.º 1
0
 // Token: 0x060001CC RID: 460 RVA: 0x00009894 File Offset: 0x00007A94
 public static void SetMaterials(this Renderer renderer, Material[] materials, int count)
 {
     if (RendererSetMaterialsExtension.sharedMaterialArrays.Length < count)
     {
         RendererSetMaterialsExtension.InitSharedMaterialsArrays(count);
     }
     Material[] array = RendererSetMaterialsExtension.sharedMaterialArrays[count];
     Array.Copy(materials, array, count);
     renderer.materials = array;
     Array.Clear(array, 0, count);
 }
Ejemplo n.º 2
0
    // Token: 0x060001CD RID: 461 RVA: 0x000098D0 File Offset: 0x00007AD0
    public static void SetMaterials(this Renderer renderer, List <Material> materials)
    {
        int count = materials.Count;

        if (RendererSetMaterialsExtension.sharedMaterialArrays.Length < count)
        {
            RendererSetMaterialsExtension.InitSharedMaterialsArrays(count);
        }
        Material[] array = RendererSetMaterialsExtension.sharedMaterialArrays[count];
        materials.CopyTo(array, 0);
        renderer.materials = array;
        Array.Clear(array, 0, count);
    }
Ejemplo n.º 3
0
 // Token: 0x060001C9 RID: 457 RVA: 0x00009809 File Offset: 0x00007A09
 static RendererSetMaterialsExtension()
 {
     RendererSetMaterialsExtension.InitSharedMaterialsArrays(16);
 }