public void SetData(Array data) { this.InternalSetData(data, Marshal.SizeOf(data.GetType().GetElementType())); }
public WallService(int capacity) { this.capacity = capacity; _colliders = new List<Transform>(capacity); _walls = new Wall[capacity]; Walls = new ComputeBuffer(capacity, Marshal.SizeOf(typeof(Wall))); Walls.SetData(_walls); }