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.
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
public sealed class SettingPlayerActionAttribute : SettingPathAttributeWorks the other way round from SettingAttribute: Gears reads the member rather than writing to it. The member must be static and declared as InControl.PlayerAction or a class derived from it. A field may be readonly; a property needs a getter, which may be private. The path must name a Binding setting, so it is always a global path, "tabName.CategoryName.SettingName". BindSettingsClass runs, and never again. SyncSettingsToClass does not read it. Create your PlayerActionSet before you bind: a member that is null at that point is logged and skipped, and the row reads "- Missing PlayerAction -". Every other problem is also logged and skips that member only. See the Bind Settings with Attributes guide.
Inheritance: Object → Attribute → SettingPathAttribute → SettingPlayerActionAttribute
Attributes: AttributeUsageAttribute
Constructors
SettingPlayerActionAttribute(String)
public SettingPlayerActionAttribute(string settingPath)Initializes the attribute with the path of the Binding setting.
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.
SettingListenerAttribute
Base for attributes that bind a static method to a setting's event. The setting path must be in the form "tabName.CategoryName.SettingName" for global settings and "CategoryName.SettingName" for world settings.