- Home /
Saving folders on different operating systems?
How would you save e.g. save states and configs on different operating systems? On Windows I would save it in "My Documents" using: System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
Is this the same for MacOS? What about Linux and the myriads of different Linux distributions? What about Xbox and Playstation?
Comment
Answer by lassade · Jan 23, 2018 at 10:52 PM
use Application.persistentDataPath, but if you want to save in my documents in linux and I think on mac you can check the Environment variable called "HOME".
Application.persistentDataPath is from Unity api so is you best bet to be consistent and simple here to save your game data.
Your answer
![](https://koobas.hobune.stream/wayback/20220612151147im_/https://answers.unity.com/themes/thub/images/avi.jpg)