Skip to documentation
LITHIUM
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;

View source

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;

View source

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;

View source

SaveConfig

Status: Stable

Signature

C#
public void SaveConfig()

Description

Persists the current configuration to this addon's data directory.

Example

C#
instance.SaveConfig();

View source

Cette page vous a-t-elle aidé ?

N’indiquez aucune donnée personnelle dans votre commentaire.

0/1000