- Home /
.xml .csv .txt .json which one can be load and save on Android ?
OK.I am really new to the Unity community.I have posted twice,but I have got no response,and I can't find my post either.
Let me try again.
Here come to the point.
I am working on a project which is supposed to run on Android platform.What I actually need to do is read some information from a outer file,and save the information into a List.I may change the information when I operate the scene.Before quitting the application,I need to save the information back to outer file.Then next time,when I run the application,I can see what is changed.
At first,I chose .xml file to achieve the goal.For example,I tap on a cube to make sure the cube is collected.When I am about to quit,I need to save the cube's information of being collected into the xml file.Next time when I run the application,the List would show that the cube is collected before.
That's my demand.The project is almost done except the information saving part.In the reading part,I coded like this:
XmlDocument doc = new XmlDocument();
TextAsset textAsset;
textAsset = (TextAsset)Resources.Load("ModelsInformation",typeof(TextAsset));
doc.LoadXml(textAsset.text);
There must be someone has conquered the problem. Please help me with that.
Thank you
Your answer
Follow this Question
Related Questions
Loading Xml file issues 0 Answers
Where can I put xml on android? 1 Answer
How to modify or save xml on Android 0 Answers
Save and Load data from Local XML file won't work 1 Answer
Project feasibility 1 Answer