Skip to content

EditorConfigUtility

Namespace: SideXP.Core.EditorOnly

public static class EditorConfigUtility

Utility class for working with editor configs.

Methods

Get<TConfig>()

public static TConfig Get<TConfig>()

Get the loaded configs for a given type, or load it if it's not already loaded.

Type parameters

  • TConfig: The type of the editor config to get or load.

Returns

Returns the loaded editor config.

Get<TConfig>(TConfig)

public static bool Get<TConfig>(out TConfig instance)

Get the loaded configs for a given type, or load it if it's not already loaded.

Type parameters

  • TConfig: The type of the editor config to get or load.

Parameters

  • instance: Outputs the loaded editor config.

Returns

Returns true if the expected object has been loaded successfully.

Save(IEditorConfig)

public static bool Save(IEditorConfig config)

Saves the given editor config on disk.

Parameters

  • config: The config to save.

Returns

Returns true if the object has been saved successfully.

SaveAll()

public static bool SaveAll()

Saves all the loaded editor configs.

Returns

Returns true if all the editor configs object have been saved successfully.