I am loading text into an array from a text file. I know the array is being populated from when I debug the program, but when i attempt to output the information i get the error “Type function(): Object does not support Slicing.” How do i go about fixing this? I will post my code below
var returnChar = "
"[0];
var commaChar = “,”[0];
var dataLines = dataFile.text.Split(returnChar);
var buildDataPairs = new ArrayList();
for (var dataLine in dataLines) {
var dataPair = dataLine.Split(commaChar);
buildDataPairs.Add(dataPair);
}
var dataPairs = buildDataPairs.ToArray;
Debug.Log(dataPairs[0][0]);