using UnityEngine; using System.Collections; public class TwoDA : Object { public TwoDA(string filepath) { // Read the file and display it line by line. System.IO.StreamReader file = new System.IO.StreamReader(filepath); string line = file.ReadLine(); m_header = line.Split(); int nCols = m_header.Length; m_data = new string[100, nCols-1];//TODO: make this array dynamic instead of 100 int nFileLine = 1; while((line = file.ReadLine()) != null) { Debug.Log(line); if(line[0] != '#'){//Ignore commented lines string[] linedata = line.Split(); if(linedata.Length == nCols){ int nLine = int.Parse(linedata[0]); for(int i=0 ; i