Been trying this today without success
In my text file I m loading, I have the following lines
-0.4, 0.0, 1.4 : tv
0.3, -0.3, 0.4 : bathroom
0.4, -0.1, 0.1 : kitchen
0.2, -1.7, 1.4 : mancave
etc
I am trying to loop through each line and have
I tried :
string[] array = text.Split(':');
position = StringToVector3(array[0]);
foreach (string token in array)
//for (int i = 0; i < lines2.Length ; i++)
{
print(token);
GameObject go2 = Instantiate(prefab, new Vector3(position), Quaternion.identity);
//str = gst.GetComponent<Text>().text;
}
But it fails on position which I thought I could assign to array[0] which is converted from StringToVector
ANy advice, help would be appreciated.