Skip to main content

ControllerActionsManager

A class in Root.Township, the global namespace.

Per-hand component that holds the hand's ControllerActions and adds, sets or removes controller modes (input mapping sets) for the active XR platform. On each PlayerInput.

Constructors​

MemberWhat it is
ControllerActionsManager()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

4 private and internal fields
MemberWhat it is
private ControllerModeSettings controllerSettingsSettings asset that maps mode types to their per-platform mappings.
private ControllerModeType[] defaultModesModes added by AddDefaultModes.
private static Logger loggerNLog logger for this class.
private PlayerInput playerInputThis hand's PlayerInput.

Properties​

MemberWhat it is
ControllerActions ControllerActions { get; private set; }This hand's action set, made in Awake.
ControllerAction this[ControllerActionType type] { get; }Gets this hand's controller action of the given type.
1 private and internal property
MemberWhat it is
private ControllerActionsManager OtherActionsManager { get; }The other hand's actions manager, used for the both-hands options.

Methods​

MemberWhat it is
void AddControllerMode(ControllerModeType modeType, bool isForBothHands)Adds the mode's mapping for the active platform on top of the current ones, optionally on both hands.
void AddDefaultModes()Adds every mode in defaultModes to this hand.
void ClearAllControllerMappings(bool isForBothHands)Removes every action mapping from this hand, optionally from both hands.
void RemoveControllerMode(ControllerModeType modeType, bool isForBothHands)Removes the mode's mapping for the active platform, optionally on both hands.
void SetControllerMode(ControllerModeType modeType, bool isForBothHands)Replaces the current mappings with the mode's mapping for the active platform, optionally on both hands.
1 private and internal method
MemberWhat it is
private void Awake()Creates the ControllerActions for this hand's input.

Used in​

Members of other types that take, return or hold a ControllerActionsManager: