using UnityEngine;
using System.Collections;
using System;
public class test : MonoBehaviour {
IEnumerator Start ()
{
int a = 1;
int f = 1;
string url = "http://www.decadesband.com/uploads/2/8/0/0/2800976/song_data.csv";
WWW www = new WWW (url);
yield return www;
String [,] basic = new String [2,7];
String [] split = www.text.Split(new Char [] {',',' '});
foreach (String s in split)
{
if(a<3)
{
basic[a,f] = s;
f += 1;
if(f>7)
{
f=1;
a+=1;
}
}
}
Debug.Log(basic[1,5]);
}
void Update ()
{
}
}
Error log i recieved
IndexOutOfRangeException: Array index is out of range.
test+c__Iterator0.MoveNext () (at Assets/test.cs:19)