TOCK by NullSave\Input Cog\Scripts\InputCog.cs


The InputCog class contains static properties and methods you can use anywhere in your project instead of the standard Input class. You'll just need to make sure you have at least one instance of InputCog on a GameObject somewhere in your game.

Click here for the MonoBehaviour documentation.


ActiveControllerReturns the PlatformController currently being used, ignoring Joysticks for consoles.
ActiveControllerNameReturns the name of the currently active PlatformController.
AllowMouseGesturesAre mouse gestures allowed?
CurrentControllerReturns current PlatformController.
DesktopGestureModeReturns desktop touch gesture mode.
ForbiddenRemapKeysReturns a list of KeyCodes forbidden by for remapping.
InstanceReturns current instance of InputCog.
IsGestureTrainingModeAre we in gesture training mode?
JoystickAttachedReturns true if any joystick is attached to device.
JoysticksReturns a list of all joysticks attached to the device.
LastGestureDataSets or returns the last gesture data received.
LockGestureAre we locking gestures?
RemapButtonsReturns a list of PlatformControllerInputs available for remapping.
UsingJoystickReturns true if a joystick is actively being used by InputCog.


AddInputAdds a new PlatformController (Editor Only).
AnyKeyChecks if any key is being pressed.
GetActionReturns a PlatformControllerAction by name.
GetAxisGets current axis value.
GetButtonGets current button pressed state.
GetButtonDownChecks if button was pressed this frame.
GetCurrentPlatformGets the current generic platform.
GetInputReturns PlatformControllerInput by name.
GetTouchButtonGets TouchButtonInfo by name.
GetTouchJoystickAxisGets touch axis value by name.
HasTouchAxisChecks if a touch axis exists for supplied name.
HasTouchButtonChecks if a touch button exists for supplied name.
IsFingerLockedChecks if finger id is currently locked.
LockFingerLocks a finger id.
ReleaseFingerUnlocks a finger id.
ResetAllDefaultsResets defaults on all PlatformControllers.
ResetDefaultsResets defaults for PlatformController by name.
SetJoystickPlatformForces InputCog to use joystick by PlatformController name supplied.
SetTouchJoystickAxisAdds/Sets value of touch joystick axis by name.
SetTouchJoystickButtonAdds/Sets value of touch button by name.


controllerChangedRaised whenever the active controller or active joystick changes.
gestureMatchedRaised when a touch gesture has been recognized.
gestureReceivedRaised when a touch gesture is received (prior to matching).
onActiveJoystickDisconnectedRaised when the active joystick is disconnected.
onJoystickConnectedRaised when any joystick is connected.
onJoystickDisconnectedRaised when any joystick is removed.
onNewActiveJoystickRaised when a new joystick has been made active.
unknownGestureRaised whenever a gesture is receive and cannot be matched.