Answer the question
In order to leave comments, you need to log in
How to save List to json/xml(Doesn't matter which) file?
You need to save the List to a file.
public class House
{
public int FarmId;
public string FarmName;
public bool FarmHave;
}
Answer the question
In order to leave comments, you need to log in
Mark a class as serializable
AND save
[
]
string json = JsonUtility.ToJson(classData);
System.IO.File.WriteAllText("json.json", json);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question