In my VoroGrid object, I use this to take a file containing point position data, and parse the data to produce a set of Vector3 positions.
This is a simplified overview of it:
public class VoroGrid : MonoBehaviour
{
TextAsset _tableResource; // text file where each line holds a {x,y,z}
CSVTable _table = new CSVTable(_tableResource);
}
public struct CSVTable
{
public CSVRecord[] Records; // synonymously a Vector3
public CSVTable(TextAsset table)
{
Parse(table); // each line in the table is turned a CSVRecord
}
}```
It works well enough, but its currently limited to my VoroGrid only holding a single 1x1 table. I'm not sure how best to explain, but in the second image I take a 1x1 grid and tile it into a 4x4 grid. Thats the desired effect with my VoroGrid.
Pretty much the same sort of effect you would get when you scale a UV texture down, you get a repeating texture.
If I could scale the "space" my table exists in, it would allow a single CSVTable struct to have a repeating pattern.