Click or drag to resize

PlayerControllerHelperMapHelperSetMapsEnabled Method (Boolean, ControllerType, Int32)

Set the enabled state in all controller maps in a category for a particular controller type. NOTE: This method is not a persistent flag in Player that will set a certain category of map enabled/disabled upon loading. It is simply a shortcut for the iterating the controller maps currently loaded in the Player and set them enabled/disabled at the time the method is called. When new Controller Maps are loaded in the Player, either manually or when a Joystick is assigned, the newly loaded maps will be enabled/disabled based on the default enabled state settings for these maps on the Player page in the Rewired Input Manager, not based on previous calls to SetMapsEnabled. Read the documentation on Controller Maps for more information. If you need persistent enabled state management, use ControllerMapEnabler. If enabled is set to true and rules exist that affect the Controller Maps you are attempting to change the enabled state on, you should not use this function and instead use the functions in ControllerMapEnabler.

Namespace:  Rewired
Assembly:  Rewired_Core (in Rewired_Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public int SetMapsEnabled(
	bool state,
	ControllerType controllerType,
	int categoryId
)

Parameters

state
Type: SystemBoolean
The enabled state.
controllerType
Type: RewiredControllerType
The controller type.
categoryId
Type: SystemInt32
The id of the category.

Return Value

Type: Int32
Number of maps that changed state.
See Also