Home>

unity is a beginner.
I have a question about updating a unity app.
We are making offline apps for android and iOS.

Using Json Utility,
I am saving the save data as a JSON file directly under the asset folder,
If i update the application as it is, the saved data will be lost, right?
("Update" is not for Unity itself, but for users who update it via the play store or app store.)

I heard that PlayerPrefs will retain the data when updating.
I also thought about converting json to a string and saving it with PlayerPrefs, but for future study

Other than PlayerPrefs
Please let me know if there is a way to prevent the JSON file (or the target folder) from being updated even after updating.  

I am sorry for the vague question.

What I tried

I searched variously such as "unity iOS app update", but it was stuck without talking about the update of unity itself or hitting. .. ..

Supplemental information (FW/tool version, etc.)

Unity 2019.3.10f1 (2D)
PC: Windows10
Platform: iOS, Android

  • Answer # 1

    I think if you googling with "Unity data save", etc.,
    Using PlayerPrefs as the questioner said,
    Application.persistentDataPath It is better to save it in the path obtained in.

    In the first place, the Assets folder is where you place "read-only" items such as materials,
    The idea of ​​saving save data in the Assets folder is strange.

  • Answer # 2

    What if I save the data in a folder that is not the update target?