-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If a scene is open in godot and the scene file is modified outside godot a prompt should be given on whether or not to update or overwrite #11803
Comments
This is a nuisance when working with a team on a project, when for instance pulling changes to a scene while the scene is open in godot. As these changes get discarded, and not shown when running the scene, and also overwritten if you save the scene. |
@AlekhineDev You got less problem when changed are made from external source (coder or repository pull) when you disable this editor setting "Auto Save Before Running" #8994 There is also this issue. #8615 |
On Linux I guess this could be done with inotify. When a change happens to a scene file in the filesystem (and the scene has unsaved in-memory changes) a popup could appear in Godot prompting the user to take actions. Either discard current changes or overwrite the filesystem version with the current in-memory working copy. |
You could also read the timestamp when reading in the file initially, then the timestamp can be checked again on saving to see if it has been modified. You could poll for the timestamp if you want to get notifications during editing. |
I'm quite sure every OS has a way to get notifications to your program when a file has been changed (like inotify as @uldall mentioned above). This would be the "correct" way to implement this. |
Note partially related to @NathanWarden and this issue in general: |
For the time being - is there a way around this issue that's better than quitting the editor before every git pull? |
It's interesting because the title of the issue says |
It does work around the issue of the editor overwriting any changes pulled from remote. As it is now, any external changes are simply discarded. |
Duplicate of #20250. |
Operating system or device, Godot version, GPU Model and driver (if graphics related):
Linux Mint.
Godot 2.1.4.
GPU irrelevant.
Issue description:
If a scene is open in Godot and the scene file is externally modified no prompt is given of this conflict, if changes are made in Godot, saving will overwrite the external modifications to the scene file.
It should prompt the user whether or not to update the scene according to the new scene file or whether to overwrite these.
Ideally it should prompt immediately as the external changes are made.
Steps to reproduce:
Create a scene, make a change and save.
With the scene still open in Godot then externally modify the scene file(i.e by git pulling a commit with modifications to the scene)
Link to minimal example project:
An example project with its own readme.
https://github.com/AlekhineDev/godot-bug-scene-conflict
The text was updated successfully, but these errors were encountered: