So I am streaming values from a text file that is being written to by an arduino micro controller into unity using streamreader.
I split the file into strings based on each line.
Then I split that string into sub strings that are comma seperated
So I take 20,30,40,50
and make
20
30
40
50
Before doing this I count the number of commas in the current line.
I want to create variables based on the arbitrary number of commas in each line, and store the value of the most recent value in the text file in the variable… for example.
20,30,40,50 becomes
var 1 =20
var 2 =30
var 3 =40
var 4= 50
How do I create variables = to the number delimetered values per line?