blob: f513a90ff550c39ccbcab2c469a81e61bc306d6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
using System.Collections.Generic;
using UnityEngine;
namespace NGS.MeshFusionPro;
public static class RendererHelper
{
private static List<Material> _materials;
static RendererHelper()
{
_materials = new List<Material>();
}
public static Material GetSharedMaterialWithoutAlloc(this Renderer renderer, int index)
{
renderer.GetSharedMaterials(_materials);
return _materials[index];
}
}
|