Skip to content

Game.Settings.SettingsUIDirectoryPickerAttribute

Assembly:
Likely the game's main assembly (e.g. Assembly-CSharp.dll) — exact assembly depends on the modding environment.

Namespace: Game.Settings

Type: class

Base: System.Attribute

Summary:
A marker attribute used to indicate that a settings property should be rendered as a directory (folder) picker in the game's settings UI. It does not carry any additional data or behavior itself; it simply signals the UI layer or settings system to present a folder-browsing control for the attributed property. The attribute can be applied to properties and is inheritable by derived types.


Fields

  • None.
    This attribute does not declare any fields.

Properties

  • None.
    This attribute does not expose properties; it is a parameterless marker attribute.

Constructors

  • public SettingsUIDirectoryPickerAttribute()
    Default, parameterless constructor. As a simple marker attribute, it requires no initialization parameters.

Methods

  • None.
    There are no methods defined on this attribute type.

Usage Example

using Game.Settings;

// A settings class where the UI will render a folder picker for SaveFolder
public class MyModSettings
{
    [SettingsUIDirectoryPicker]
    public string SaveFolder { get; set; } = "C:\\MyMod\\Data";
}

Additional notes: - Declaration in source: - [AttributeUsage(AttributeTargets.Property, Inherited = true)] - public class SettingsUIDirectoryPickerAttribute : Attribute - Because this is a marker attribute, the settings UI or settings-processing code must explicitly check for this attribute on properties to enable the directory picker behavior. - Typically used on string properties that store a filesystem path. Implementations should validate or normalize the selected path as needed.