Guide 08
Lithium.Addons.Addon<TConfig>
An addon backed by a strongly typed, persistent configuration.
This page is generated from the public C# symbols in src/game/sandbox/Code.
AddonTConfig
Status: Stable
Signature
C#
public abstract class Addon<TConfig> : Addon where TConfig : AddonConfig, new()Description
An addon backed by a strongly typed, persistent configuration.
Example
C#
Addon<TConfig>? value = null;Members
Config
Status: Stable
Signature
C#
public TConfig Config { get; private set; }Description
The current configuration. It is loaded before OnAddonLoaded runs.
Example
C#
var value = instance.Config;IsEnabled
Status: Stable
Signature
C#
public sealed override bool IsEnabled { get; }Description
Whether the loaded configuration enables this addon.
Example
C#
var value = instance.IsEnabled;SaveConfig
Status: Stable
Signature
C#
public void SaveConfig()Description
Persists the current configuration to this addon's data directory.
Example
C#
instance.SaveConfig();