SettingAttribute
Binds a static field or property to the setting its path names. Pass the declaring type to BindSettingsClass and the member is assigned the resolved setting. A field must be static and neither readonly nor const; a property must be static and have a setter, which may be private.
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
public sealed class SettingAttribute : SettingPathAttributeBindSettingsClass assigns the resolved setting into the member before it subscribes any listener on the same type. The member's declared type must be one the setting actually implements — anything from IModSetting down to the concrete class. Anything else is logged and skipped. See the Bind Settings with Attributes guide.
Inheritance: Object → Attribute → SettingPathAttribute → SettingAttribute
Attributes: AttributeUsageAttribute
Constructors
SettingAttribute(String)
public SettingAttribute(string settingPath)Initializes the attribute with the setting path.
SettingPathAttribute
Base for any attribute that names a setting by its path. The path is "tabName.CategoryName.SettingName" for global settings and "CategoryName.SettingName" for world settings.
SettingPlayerActionAttribute
Assigns the PlayerAction held by a static field or property to the Binding setting its path names. Pass the declaring type to BindSettingsClass and Gears reads the member and sets IControlBindingSetting.PlayerAction from it.