Here's my code so far
CUSTOMCLASS.CS
public string[,] tableBR;
string[] strData = {"P ,B ,B ,P ,B ,B ,B ,B ,B ,B ,P ,P ,B ,P "};
public int X_LENGTH = 104;
public int Y_LENGTH = 15;
#region BR VARIABLES
string BigRD= "";
string[] newBigRD;
string realData= "";
#endregion
public Scoreboard(){
tableBR= new string[X_LENGTH,Y_LENGTH ];
}
public void MakeBR(string data){
BigRD = data;
for(int i = 0; i < strData.Length; i++){
BigRD += strData [i];
BigRD += ",";
}
newBigRD= BigRD .Split (',');
foreach(string newData in newBigRD){
realData = newData;
}
}
public string ShowBigRD(){
return realData;
}
public override string ToString(){
return "this are all the data :" + realData.ToString();
}
And here is my main class
MAINCLASS.CS
string BigRD= "";
void Start(){
StartCoroutine ("Win_Log");
}
IEnumerator Win_Log(){
Scoreboard scoreBoard = new Scoreboard();
scoreBoard.MakeBR(BigRD);
Debug.Log ("This is the data : " + scoreBoard.ShowBigRD());
yield return new WaitForEndOfFrame ();
}
It gives me a null string value . It only prints
"this are all the data :"