reckfellENGINE

EditorSettings

Editor environment settings, separate from game project settings.

On this page
class EditorSettingsReckfellSharpEditorInherits Resource

Obtain the current object through EditorInterface.Singleton.GetEditorSettings(). Read optional keys through HasSetting() and GetSetting(), accounting for the Variant type. Do not dispose the borrowed singleton.

C# IDE selection lives in dotnet/editor/external_editor; the general Text Editor handler uses a different setting branch. Reading a value neither launches an IDE, verifies its installation nor builds a project.

External editor setup and diagnosis.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

EditorSettingsConstructor
# EditorSettings
C#
public EditorSettings();

Methods24

AddPropertyInfovoid
# AddPropertyInfo
C#
public void AddPropertyInfo(Reckfell.Collections.Dictionary info);

Adds a custom property info to a property. The dictionary must contain:

  • name: string (the name of the property)
  • type: [int] (see Variant.Type)
  • optionally hint: string
C#
var settings = GetEditorInterface().GetEditorSettings();
settings.Set("category/property_name", 0);

var propertyInfo = new Reckfell.Collections.Dictionary
{
    { "name", "category/propertyName" },
    { "type", Variant.Type.Int },
    { "hint", PropertyHint.Enum },
    { "hint_string", "one,two,three" },
};

settings.AddPropertyInfo(propertyInfo);
Parameters
NameTypeDefault
infoReckfell.Collections.Dictionary—
AddShortcutvoid
# AddShortcut
C#
public void AddShortcut(string path, Shortcut shortcut);

Adds a shortcut whose path is specified by path. The path determines how the shortcut is organized and displayed in the editor's shortcut settings. The path format affects the display as follows:

  • "name" (no slash): Creates a category named name with the shortcut displayed as name.
  • "category/name" (single slash): Displays as name in the category section.
  • "category/name/extra" (multiple slashes): Extra path components are ignored, so this behaves the same as "category/name". Note: Shortcuts are only saved to the editor settings if they differ from their original/default state. This means empty shortcuts that were originally empty will not persist between editor sessions and must be re-added. If a shortcut with the same path already exists, this method will update it with the new shortcut instead of creating a duplicate.
Parameters
NameTypeDefault
pathstring—
shortcutShortcut—
CheckChangedSettingsInGroupbool
# CheckChangedSettingsInGroup
C#
public bool CheckChangedSettingsInGroup(string settingPrefix);

Checks if any settings with the prefix setting_prefix exist in the set of changed settings. See also EditorSettings.GetChangedSettings.

Parameters
NameTypeDefault
settingPrefixstring—
Returns bool
Erasevoid
# Erase
C#
public void Erase(string property);

Erases the setting whose name is specified by property.

Parameters
NameTypeDefault
propertystring—
GetChangedSettingsstring[]
# GetChangedSettings
C#
public string[] GetChangedSettings();

Gets an array of the settings which have been changed since the last save. Note that internally changed_settings is cleared after a successful save, so generally the most appropriate place to use this method is when processing EditorSettings.NotificationEditorSettingsChanged.

Returns string[]
GetFavoritesstring[]
# GetFavorites
C#
public string[] GetFavorites();

Returns the list of favorite files and directories for this project.

Returns string[]
GetProjectMetadataVariant
# GetProjectMetadata
C#
public Variant GetProjectMetadata(string section, string key, Variant @default = default);

Returns project-specific metadata for the section and key specified. If the metadata doesn't exist, default will be returned instead. See also EditorSettings.SetProjectMetadata.

Parameters
NameTypeDefault
sectionstring—
keystring—
defaultVariantdefault
Returns Variant
GetRecentDirsstring[]
# GetRecentDirs
C#
public string[] GetRecentDirs();

Returns the list of recently visited folders in the file dialog for this project.

Returns string[]
GetSettingVariant
# GetSetting
C#
public Variant GetSetting(string name);

Read an editor setting by its exact path. Call HasSetting() first for an optional key and check the Variant type before conversion. dotnet/editor/ and text_editor/external/ settings belong to different handlers.

Parameters
NameTypeDefault
namestring—
name

The exact editor setting key, not its localized UI label.

Returns Variant

The current setting value as a Variant.

GetShortcutShortcut
# GetShortcut
C#
public Shortcut GetShortcut(string path);

Returns the shortcut specified by path. Tries to find a built-in action if no shortcut with the provided path is found in the shortcut list. If found, adds it to the list and returns it, otherwise returns null.

Parameters
NameTypeDefault
pathstring—
Returns Shortcut
GetShortcutListstring[]
# GetShortcutList
C#
public string[] GetShortcutList();

Returns the list of stored shortcut paths.

Returns string[]
HasSettingbool
# HasSetting
C#
public bool HasSetting(string name);

Check whether a setting exists in the editor object. Use before GetSetting() for optional integration settings. A key does not establish that a program is installed or that an IDE launch succeeded.

Parameters
NameTypeDefault
namestring—
name

The exact setting path, for example dotnet/editor/external_editor.

Returns bool

true when the setting key exists.

HasShortcutbool
# HasShortcut
C#
public bool HasShortcut(string path);

Returns true if the shortcut specified by path exists, false otherwise.

Parameters
NameTypeDefault
pathstring—
Returns bool
IsShortcutbool
# IsShortcut
C#
public bool IsShortcut(string path, InputEvent @event);

Returns true if the shortcut specified by path matches the event specified by event, false otherwise.

Parameters
NameTypeDefault
pathstring—
eventInputEvent—
Returns bool
MarkSettingChangedvoid
# MarkSettingChanged
C#
public void MarkSettingChanged(string setting);

Marks the passed editor setting as being changed, see EditorSettings.GetChangedSettings. Only settings which exist (see EditorSettings.HasSetting) will be accepted.

Parameters
NameTypeDefault
settingstring—
RemoveShortcutvoid
# RemoveShortcut
C#
public void RemoveShortcut(string path);

Removes the shortcut specified by path.

Parameters
NameTypeDefault
pathstring—
SetBuiltinActionOverridevoid
# SetBuiltinActionOverride
C#
public void SetBuiltinActionOverride(string name, Reckfell.Collections.Array<InputEvent> actionsList);

Overrides the built-in editor action name with the input actions defined in actions_list.

Parameters
NameTypeDefault
namestring—
actionsListReckfell.Collections.Array<InputEvent>—
SetFavorites2 overloads
# SetFavorites · 1/2
C#
public void SetFavorites(ReadOnlySpan<string> dirs);

Sets the list of favorite files and directories for this project.

Parameters
NameTypeDefault
dirsReadOnlySpan<string>—
# SetFavorites · 2/2
C#
public void SetFavorites(string[] dirs);

Sets the list of favorite files and directories for this project.

Parameters
NameTypeDefault
dirsstring[]—
SetInitialValuevoid
# SetInitialValue
C#
public void SetInitialValue(StringName name, Variant value, bool updateCurrent);

Sets the initial value of the setting specified by name to value. This is used to provide a value for the Revert button in the Editor Settings. If update_current is true, the setting is reset to value as well.

Parameters
NameTypeDefault
nameStringName—
valueVariant—
updateCurrentbool—
SetProjectMetadatavoid
# SetProjectMetadata
C#
public void SetProjectMetadata(string section, string key, Variant data);

Sets project-specific metadata with the section, key and data specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also EditorSettings.GetProjectMetadata.

Parameters
NameTypeDefault
sectionstring—
keystring—
dataVariant—
SetRecentDirs2 overloads
# SetRecentDirs · 1/2
C#
public void SetRecentDirs(ReadOnlySpan<string> dirs);

Sets the list of recently visited folders in the file dialog for this project.

Parameters
NameTypeDefault
dirsReadOnlySpan<string>—
# SetRecentDirs · 2/2
C#
public void SetRecentDirs(string[] dirs);

Sets the list of recently visited folders in the file dialog for this project.

Parameters
NameTypeDefault
dirsstring[]—
SetSettingvoid
# SetSetting
C#
public void SetSetting(string name, Variant value);

Sets the value of the setting specified by name. This is equivalent to using ReckfellObject.Set on the EditorSettings instance.

Parameters
NameTypeDefault
namestring—
valueVariant—

Signals and events1

SettingsChangedEvent
# SettingsChanged
C#
public event Action SettingsChanged;

Emitted after any editor setting has changed.

Fields and constants1

NotificationEditorSettingsChangedField
# NotificationEditorSettingsChanged
C#
public const long NotificationEditorSettingsChanged = 10000;

Emitted after any editor setting has changed. It's used by various editor plugins to update their visuals on theme changes or logic on configuration changes.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.