I’ve got a plugin that makes use of it’s own editor settings, however they only appear when “advanced” is checked, and I don’t believe these settings warrant being “advanced” I would like them to appear in the basic view too.
Here is my flow for creating editor settings. I see that there is a PROPERTY_USAGE_EDITOR_BASIC_SETTING flag, but I have no idea where it would go.
var ed_settings := EditorInterface.get_editor_settings()
# A Dictionary stores default values for every setting
for key: String in default_editor_settings.keys():
var default: Variant = default_editor_settings[key]
# If they don't have these settings, such as on first launch, create them
# careful not to overwrite the user's previous value
if !ed_settings.has_setting(EDITOR_SETTINGS_PREFIX + key):
ed_settings.set_setting(EDITOR_SETTINGS_PREFIX + key, default)
# Allow reverting changes
ed_settings.set_initial_value(EDITOR_SETTINGS_PREFIX + key, default, false)
# Every setting uses an add_property_info call
ed_settings.add_property_info({
"name": EDITOR_SETTINGS_PREFIX + "enable_2d",
"type": TYPE_BOOL,
#"usage": PROPERTY_USAGE_EDITOR_BASIC_SETTING # I have tried this to no avail
})
I haven’t tested it but by looking at the C++ code you still need to keep the PROPERTY_USAGE_EDITOR and PROPERTY_USAGE_STORAGE (or use PROPERTY_USAGE_DEFAULT)
So try "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_EDITOR_BASIC_SETTING
The editor settings still only appear in the advanced view.
I am restarting the project when changing this plugin script, I don’t see anything inside the editor settings tres config file that would affect this advanced view so I believe restarting the editor should be a clean test.
I see ProjectSettings has .set_as_basic, but this does not exist for EditorSettings. The source code for this method seems impossible to replicate from GDScript, as it’s .basic is a regular old unexposed bool.