hiii im working lately in a project that needs to read a csv file and show the rows and not the columns, well you see most of the videos, tutorials and docs that i have found explains how to do it by reading the file and then showing just the columns like this example:
the file:

the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;
using System.IO;
public class UIOutputText : MonoBehaviour
{
public List<operacion> operaciones = new List<operacion>();
public Text cargo;
public Text abono;
void Start()
{
TextAsset datainfo = Resources.Load<TextAsset>("datainfo");
string[] data = datainfo.text.Split(new char[] { '\n' });
Debug.Log(data[1]);
for (int i = 1; i < data.Length - 1; i++)
{
string[] row = data[i].Split(new char[] { ',' });
operacion o = new operacion();
o.data1 = row[0];
o.data2 = row[1];
o.data3 = row[2];
o.data4 = row[3];
operaciones.Add(o);
}
foreach (operacion o in operaciones)
{
Debug.Log(o.data2);
}
}
And the data is retrieved by columns and show in the debugger of unity like this:
[21:34:04] id
[21:34:04] data1
[21:34:04] data2
That’s good… but i don’t need that, now my case is something like this i have a csv file like this:
The file:
And it should be shown like this in unity (as a ui text file or in the debugger… you name it) :
sentencea worda sentenceg wordg
I don’t know how to do it, the only thing that i have is the code that is above and from there I don’t know how to proceed, is there any solution or advice… something? thanks in advance
