Click or drag to resize

ControllerMapEnabler Class

Enforces persistent enabled states on Controller Maps in a Player based on user settings. This can be used to make specific Controller Maps be enabled or disabled in a Player, for example when changing game modes that require user input to change. These settings will persist and be inherited by new Controllers assigned to the Player. Enabled states will be sync'd when new Controllers are added, when Controller Maps are loaded, etc. When using ControllerMapEnabler, you should not manually set enabled states on Controller Maps that are managed by this class, but instead change all settings within this class.
Inheritance Hierarchy
SystemObject
  RewiredControllerMapEnabler

Namespace:  Rewired
Assembly:  Rewired_Core (in Rewired_Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public sealed class ControllerMapEnabler

The ControllerMapEnabler type exposes the following members.

Properties
  NameDescription
Public propertyenabled
If enabled, Controller Maps enabled states will be sync'd when Controllers are assigned, new maps are loaded, etc. Changes to Controller Maps will be applied immediately in the Player when enabled.
Public propertyruleSets
The list of rule sets. When Apply is called (whether manually or on various events which trigger it), each rule set in the list will be evaluated and enable or disable Controller Maps for the Controller(s) specified in the rule properties. After modifying or replacing the list, you must call Apply for the changes to take effect in the Player.
Top
Methods
  NameDescription
Public methodApply
Applies settings to Controller Maps in the Player. This must be called if you make changes to anything in ruleSets in order for those changes to be applied to the Player's Controller Maps.
Public methodImportJson
Imports data from JSON.
Public methodImportXml
Imports data from XML.
Public methodLoadDefaults
Loads the default settings from the Rewired Input Manager.
Public methodToJsonString
Exports data to JSON.
Public methodToXmlString
Exports data to XML.
Top
See Also