Open KoBeWi opened 2 years ago
I think this would especially make sense between the transition from 3.x to 4.0. I have a feel this may be unexpected behaviour if completely automatic on startup, however.
While it's not directly related a similar issue with obsolete/leftover entries also exists in tscn/tres files (https://github.com/godotengine/godot/issues/47253), so i think it's worth rethinking how the engine deals with this in general.
Whenever Godot encounters some unknown project or editor setting upon startup, yeet it.
This would also remove settings created by a GDExtension which failed to load. I'm more in favor of hiding or visually highlighting unknown settings, and having an explicit list of deprecated settings in the editor which are automatically migrated (and/or just delete them without touching anything else).
Describe the project you are working on
Godot, games etc (not really relevant)
Describe the problem or limitation you are having in your project
Original proposal:
However the proposal didn't gain too much support and my comment about adding a button to remove such properties (instead of graying out or whatever) gained almost as much upvotes.
It was suggested in https://github.com/godotengine/godot-proposals/issues/3526#issuecomment-1096962148 to open a counter-proposal, so here it is.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Whenever Godot encounters some unknown project or editor setting upon startup, yeet it. There is no reason to keep them and they cause problems, as described above.
The only usage for custom project settings would be making a setting and then adding overrides based on platform. But this can be done in code as well.
Alternative option to removing is to hide such settings from the settings dialog. This could be useful for settings dependent on current editor build, but idk if we have such settings (maybe for mono?).
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
When project loads, Godot would check all saved project settings and editor settings and compare them with some table of defined, known settings. Not sure if making such table is possible right now, as the settings are actually defined all over the code with
EDITOR_SET
andGLOBAL_SET
. We might need to centralize it first.If a setting is not in the table, yeet. (or hide, without modifying the settings file)
If this enhancement will not be used often, can it be worked around with a few lines of script?
Technically doable with a plugin, but this should be in editor.
Is there a reason why this should be core and not an add-on in the asset library?
Editor and project settings are part of editor.