Class OptionsModule
Editor options management module.
Inheritance
Namespace: FlaxEditor.Options
Assembly: FlaxEngine.CSharp.dll
Syntax
public sealed class OptionsModule : EditorModuleFields
Options
The current editor options. Don't modify the values directly (local session state lifetime), use Apply(EditorOptions).
Declaration
public EditorOptions OptionsField Value
| FlaxEditor.Options.EditorOptions 
 | 
Properties
CustomSettings
Gets the custom settings factories. Each entry defines the custom settings type identified by the given key name. The value is a factory function that returns the default options for a given type.
Declaration
public IReadOnlyDictionary<string, OptionsModule.CreateCustomSettingsDelegate> CustomSettings { get; }Property Value
| System.Collections.Generic.IReadOnlyDictionary<System.String, OptionsModule.CreateCustomSettingsDelegate> 
 | 
Methods
AddCustomSettings(String, OptionsModule.CreateCustomSettingsDelegate)
Adds the custom settings factory.
Declaration
public void AddCustomSettings(string name, OptionsModule.CreateCustomSettingsDelegate factory)Parameters
| System.String
        name The name. | 
| OptionsModule.CreateCustomSettingsDelegate
        factory The factory function. | 
Apply(EditorOptions)
Applies the specified options and updates the dependant services.
Declaration
public void Apply(EditorOptions options)Parameters
| FlaxEditor.Options.EditorOptions
        options The new options. | 
CreateDefaultStyle()
Creates the default style.
Declaration
public Style CreateDefaultStyle()Returns
| Style The style object. | 
CreateLightStyle()
Creates the light style (2nd default).
Declaration
public Style CreateLightStyle()Returns
| Style The style object. | 
Load()
Loads the settings from the file.
Declaration
public void Load()OnInit()
Declaration
public override void OnInit()Overrides
RemoveCustomSettings(String)
Removes the custom settings factory.
Declaration
public void RemoveCustomSettings(string name)Parameters
| System.String
        name The name. | 
Events
CustomSettingsChanged
Occurs when editor options get changed (reloaded or applied).
Declaration
public event Action CustomSettingsChangedEvent Type
| System.Action 
 | 
OptionsChanged
Occurs when editor options get changed (reloaded or applied).
Declaration
public event Action<EditorOptions> OptionsChangedEvent Type
| System.Action<FlaxEditor.Options.EditorOptions> 
 |