Z
Z
Zefirot2021-03-03 12:41:26
Unity
Zefirot, 2021-03-03 12:41:26

Application.persistentDataPath is root?

I need to create folders and files in them, since PlayerPrefs is not quite suitable for this, I decided to store everything in files, but I was going to store the whole thing like this

StreamWriter writer = new StreamWriter("Assets/Resources/Data/MusicVolume.txt", false);

It turned out that this only works in the editor, then I was advised to use Application.persistentDataPath.
Now the main question - Application.persistentDataPath - how is it root and can I build my hierarchy there?
They say Create a data folder there and create user level subfolders in it, etc. and they already have files with the necessary texts (data) ....
If this is the case, then how to create folders and files there, as well as read and overwrite them?
Please provide code examples or links.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question