godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.08k stars 21.14k forks source link

Saving resources is finnicky #39492

Open Megaguy32 opened 4 years ago

Megaguy32 commented 4 years ago

I'm coming from a couple hours long session of editting resources and having lost my work because the tres files didn't save.

I have quite a few scriptable objects / resources, with an exported property. the property being an Array of Resources, (These objects link between each other)

Anyway the crux of the matter is that I was dragging and dropping resources into the "value rectangles" (idk what they're called). but didn't hit save, as I thought the resources were saved automatically since the changes were outputted in the output console. but unfortunately I was wrong.

When I closed out of Godot I was prompted to save changes to my scene, but I didn't change my scene so I thought I'd discard some irrelevant changes, which turned out to be my big mistake.

I realised my mistake and I was sad, because it was a long grind.

but re-editting the resources' properties I see that I resource being editted is not clearly displayed. E.g. when a scene is editted, an asterix appears next to the scene name, but when a resource is editted, an asterix doesn't appear next to the resource name, it instead appears next to the scene name. Which is odd because the resources and scenes are unrelated / independent of one another.

and when I hit ctrl+s in the scene edittor I get an alert saying that I've saved x number of editted resources. That happens even when I press the save button under the resource editor.

It all seems a bit finicky to me. I'd like that if I close out of godot that I'm alerted that I have unsaved resources. and that unsaved resources be represented with an asterix next to the resource name in the resource editor.

Operating system linux mint 19.3

Hardware Fujitsu Lifebook AH530

Godot version v3.2.1.stable.flathub

How to reproduce the bug open an empty / new scene create a resource with an exported property. edit the property (you see here that the scene name gets an asterix) press the save button under the resource editor. (you see here that the asterix doesn't go away) then press ctrl + s (to get a message that your resource has been saved, even though you've already saved the resource. Even now the asterix doesn't go away)

clayjohn commented 4 years ago

For clarity, the prompt to save your scene is a notification that you have unsaved changes and you should change your scene. I have marked this down as an enhancement, as it sounds like it would be nice to also have a visual notification somewhere that a resource has been edited (or at least mark the scene as edited when a subresource is edited).