Config

Used to store player configurations. For instance, key bindings, screen resolution—whatever your game happens to feature.

Data:

Configurations are saved in local storage as a list of config entries. The attributes available are:

Name: Name of the attribute.

F: Float value associated with attribute.

B: Boolean value associated with attribute.

S: String value associated with attribute.

For example, a difficulty attribute may have an f of 1.0f or an s of DIFFICULTIES.HARD.

Usage:

Games often end up with a huge list of configurable attributes. Dumping them into one C# script can get messy, so instead, you may choose to divide them into categories. Controls may be tracked via ControlConfigs, while in-game decisions can use ChoiceConfigs, etc. As long as these scripts extend from the base Configs class, ConfigManager will take care of the rest.

Retrieving data:

To retrieve your config data, call ConfigGlobals.GetConfig and pass on the name of your desired attribute. Values can be edited directly, then you may call ConfigManager to save your changes.

Required:

Core