nathanhoad / godot_dialogue_manager

A powerful nonlinear dialogue system for Godot
MIT License
2.04k stars 161 forks source link

Detect files changing on disk by external tools #597

Closed Selenyhr closed 2 months ago

Selenyhr commented 2 months ago

Is your feature request related to a problem? Please describe. When a file changes onto the disk, without going through the Godot UI, for example with a Git pull, if the same file was being opened at the time, the old version of the file will be kept within the editor. So upon saving, any change made through Git will be lost.

Describe the solution you'd like Dialogue Manager should be able to detect if a file has changed on disk when gaining focus back, and refresh the content so that changes can't be lost. I know this will be most likely tough, due to Godot not exposing an easy "file_changed_on_disk" signal. So refreshing at "the right time" will be the challenging part.

Describe alternatives you've considered Right now, I use a full project refresh whenever I pull any change. It's not really elegant, and since it involves the human remembering to do it, it's a very prone to failure solution :)