Skip to main content

ControllerInputButtonPressed

An abstract class in Root.Township, the global namespace.

Base class for components that react to one raw input button on a given controller.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private GeneralInputType buttonThe input button to listen for.
private Controller controllerThe controller whose input is watched.

Methods​

MemberWhat it is
protected virtual void Awake()Hooks the button's pressed event on the controller's raw input.
protected abstract void ButtonPressed(PlayerInput controller)Called when the button is pressed.