TOCK by NullSave\Input Cog\Scripts\Support\PlatformControllerAction.cs

Creation: Tools -> NullSave Input -> New Platform Controller Action


Represents an action (such as Jump) available to the PlatformController. Remapping of actions and inputs is done automatically and the defaults can be restored at any time.

The use of actions allows you to swap controllers in game without needing to consider what the new physical button/axis is, since queries are done by action and not input.


Action Name Name to assign to the action.
Input Source Default PlatformControllerInput to assign to action.
Allow Swapping When true this will allow a different PlatformControllerInput to be assigned.


AnyKeyCheck if this action is being pressed for AnyKey.
AnyKeyDownCheck if this action is being pressed for AnyKey this frame.
BackgroundBySizeReturns image background sprite at requested size.
ForegroundBySizeReturns image sprite at requested size.
GetAxisGets current axis value for action and player.
GetButtonGets current button state for action and player.
GetButtonDownCheck if button was pressed this frame for action and player.
InitCalled by InputCog to initialize action on load.
ResetCalled by InputCog to reset action.
ResetDefaultsRemoves remapping and restores default values.
SavePreferencesSaves current remapping values.
SetInputSets remapped input value.