Я бы сделал метод, специфичный для печати вашего списка.
public void Save() {
List<double[][]> weights = Cars[currentChild].GetWeights();
CreateTextSpecial(weights);
}
void CreateText(string input) {
string path = Application.dataPath + "/weights.text";
File.WriteAllText(path, input);
}
void CreateTextSpecial(List<double[][]> inputList){
string textToAppend = "";
for(int j=0;j<inputList.Count;j++){
textToAppend += "[";
for(int k=0;k<inputList[j].length;k++){
textToAppend +="[";
for(int l=0;l<inputList[j][k].length){
textToAppend += inputList[j][k][l]+", ";
}
textToAppend +="]\n";
}
textToAppend+="]\n";
}
string path = Application.dataPath+"/weights.text";
File.WriteAllText(path, textToAppend);
}
По сути, он проходит по всем матрицам (?) В предоставленном списке и печатает их в следующем формате:
[[0.01,0.0214,0.055,]
[0.11,0.022,0.321,0.55,0.123,]]
[[1.205,2.210,]
[0.34124,25128.250,222,2.5293,]]