//TODO: Use on OnRenderObject? private void Update() { int count = datas.Count; for (int i = 0; i < count; i++) { InstanciableData data = datas[i]; Graphics.DrawMeshInstancedIndirect(data.instanceMesh, 0, data.material, data.bounds, data.argsBuffer); } }
public void AddData(InstanciableData data) { datas.Add(data); }