W
W
wf_egor2020-10-06 07:11:27
Unity
wf_egor, 2020-10-06 07:11:27

How to save in unity?

Hello! I saved the game in an xml file and everything works on the PC. What path should I use to get the file from the Assets folder? I tried through presidentDataPath but the compiled game folder (files) is empty. How to put Xml there?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2020-10-06
@GavriKos

Saving what? Progress or level?
If you need to save something in the editor, and then use it in the build (conditionally - levels) - then use StreamingAssets.
If you need to save something in the build and use it in the build (conditionally - user progress) - then use persistentDataPath.
https://docs.unity3d.com/ScriptReference/Applicati...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question