real-ezTheDev / GodotEzDialoguePlugin

MIT License
146 stars 12 forks source link

Data not saved (maybe OneDrive issue) #17

Closed ameel closed 3 months ago

ameel commented 6 months ago

I cannot cause the issue every time, but basically, EzDialogue will not save json files sometimes. Description to sometimes create issue:

  1. make changes to a json file and save in EzDialogue window.
  2. run game.
  3. observe that game is running old json file
  4. json file in EzDialogue window still looks correct (new), and cannot save since didn't make any changes after running game.
  5. re-open save json file, and it reverts to old data.
  6. make changes and save again.
  7. reload the file to verify and confirm changes have saved correctly. sometimes that works, sometimes have to make changes and save again.

I also notice every now and then I will get Godot prompt that the json file is newer on disk and asking me whether to "resave", "reload", or "cancel". If i click reload, the EzDialogue window show the correct data, but when I manually re-open the same json file, it loads the old data.

My only suspicion at this time is that perhaps this has something to do with OneDrive? I will attempt to disable OneDrive sync for the folder and see if issue persists.

real-ezTheDev commented 6 months ago

I've noticed this happening in some of my other projects.

The problem is when the plugin editor (one with dialogue map) "saves" the file, sometimed the Godot Editor takes a moment before reloading the file that is changed by "outside" sources.

So when the Godot prompts you "resave, reload, or cancel" it's asking how do you want to sync the difference between newly loading file and one that's already loaded in the editor. if you "resave" the file, Godot replaces your new changes with old ones since it is "resaving" the file with what's already in the editor. If you "reload" the file, Godot overrides what it has loaded with the new changes.

Same as you.. I can't seem to duplicate this behavior consistently.. it happens sometimes and not all the time.. so I'll be on the look out for this behavior when it happens again.

real-ezTheDev commented 3 months ago

closing due to lack of follow up. If my response is not sufficient, and you are still facing the issue please open again.