Home > other >  Turn json file file. Writealltext read/write failure
Turn json file file. Writealltext read/write failure

Time:09-16

I do before using the json data storage, it also succeeded,
However after did some dotween animation, json file read abnormalities, suddenly the debug has written clearly shows the json, can exit the program broadcast directly to start again, reading is still before the tojson file,
If I open a json file before quit playing, file will refresh, and read success,,,
Have a great god knows why, or anyone encountered the same problem,

CodePudding user response:

Possible problems found, seems to be the file. The writealltext write some delay, so when I play fast exit json file has not yet been written that read error,
So what is the cause of this problem?

CodePudding user response:

When the code changes in the project file, need to notice the Unity updated files,
For example write json called after a: AssetDatabase. Refresh (), this function is to belong to editor function, need using UnityEditor;
  • Related