- Home /
Save XML file on desktop unity
I currently have a program that writes and reads XML filed and saves them somewhere the user can't see immediately using Application.persistentDataPath. But now, when the game's closed, I want the XML file, or better, a file containing a formatted version of the XML file to be saved on the desktop so it can be read by the user. Any suggestions on what to do or how to approach this?
Answer by kmgr · Dec 02, 2015 at 01:13 PM
use this:
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
Your answer
![](https://koobas.hobune.stream/wayback/20220612051116im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
C# Getting only the Name of the XML File and not the Directory of the XML File 2 Answers
XmlWriter.Create exception, "Could not find the file..." on Android 0 Answers
Read AND Write to XML at runtime 1 Answer
Why XmlTextReader become so slowly in Unity? 0 Answers
How to create and write a text file after compile/build 0 Answers