Click or drag to resize

CustomController Class

A virtual controller with a user-defined input source.
Inheritance Hierarchy
SystemObject
  RewiredController
    RewiredControllerWithMap
      RewiredControllerWithAxes
        RewiredCustomController

Namespace:  Rewired
Assembly:  Rewired_Core (in Rewired_Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public sealed class CustomController : ControllerWithAxes

The CustomController type exposes the following members.

Properties
  NameDescription
Public propertyAxes
List of axes in this controller.
(Inherited from ControllerWithAxes.)
Public propertyAxes2D
List of Axis2Ds in this controller.
(Inherited from ControllerWithAxes.)
Public propertyaxis2DCount
The Axis2D count in the controller.
(Inherited from ControllerWithAxes.)
Public propertyaxisCount
The axis count in the controller.
(Inherited from ControllerWithAxes.)
Public propertyAxisElementIdentifiers
Gets a list of all Axis element identifiers. There is always one element identifier per Axis which is at the same index as the corresponding Axis.
(Inherited from ControllerWithAxes.)
Public propertybuttonCount
The Button count in the controller.
(Inherited from Controller.)
Public propertyButtonElementIdentifiers
Gets a list of all Button element identifiers. There is always one element identifier per Button which is at the same index as the corresponding Button.
(Inherited from Controller.)
Public propertyButtons
List of Buttons in this controller.
(Inherited from Controller.)
Public propertycalibrationMap
The Calibration Map in this controller.
(Inherited from ControllerWithAxes.)
Public propertydeviceInstanceGuid
The unique persistent instance GUID of this device. This is an id generated for the device that may stay constant between application sessions and system restarts. This can be used for device assignment persistence between runs. The specific platform and input sources in use affects the reliability of this value for device assignment persistence. A value of Guid.Empty means the device or input source has no reliable unique identifier so persistant assignment isn't possible using this value. Even if a Guid is provided, reliability when multiple identical controllers are attached depends greatly on the platform and input source(s) currently in use.
(Overrides ControllerdeviceInstanceGuid.)
Public propertyelementCount
The Element count in the controller.
(Inherited from Controller.)
Public propertyElementIdentifiers
Gets a list of all element identifiers of all types.
(Inherited from Controller.)
Public propertyElements
List of all Elements in this controller.
(Inherited from Controller.)
Public propertyenabled
Is the controller enabled? Disabled controllers return no input.
(Inherited from Controller.)
Public propertyextension
Gets an object used to access controller and platform-specific controller functions.
(Inherited from Controller.)
Public propertyhardwareIdentifier
String of information from the controller used for identifying unknown controller maps for saving/loading.
(Inherited from Controller.)
Public propertyhardwareName
The name the controller hardware returns.
(Inherited from Controller.)
Public propertyhardwareTypeGuid
The Rewired GUID associated with this device. A GUID of all zeros is an Unknown Controller.
(Inherited from Controller.)
Public propertyidentifier
Gets identifying information about the Controller.
(Inherited from Controller.)
Public propertyisConnected
Is the controller connected?
(Inherited from Controller.)
Public propertymapTypeString
String representation of the controller map type. Can be used for saving/loading.
(Inherited from Controller.)
Public propertyname
The name of the controller. This is drawn from the controller definition for recognized controllers. For unrecognized controllers, the name returned by the hardware is used instead.
(Inherited from Controller.)
Public propertysourceControllerId
Public propertytag
The tag assigned to the controller. Can be used for find a controller by tag.
(Inherited from Controller.)
Public propertytemplateCount
The Template count in the controller.
(Inherited from Controller.)
Public propertyTemplates
The Controller Templates that the Controller implements.
(Inherited from Controller.)
Public propertytype
The type of this controller.
(Inherited from Controller.)
Top
Methods
  NameDescription
Public methodClearAxisValue(Int32)
Clears the Axis value.
Public methodClearAxisValue(String)
Clears the Axis value.
Public methodClearAxisValueById
Clears the Axis value.
Public methodClearButtonValue(Int32)
Clears the Button value.
Public methodClearButtonValue(String)
Clears the Button value.
Public methodClearButtonValueById
Clears the Button value.
Public methodGetAnyButton
Gets the button held state of any hardware button. This will return TRUE as long as any button is held. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetAnyButtonChanged
Returns true if any button has changed state from the previous frame to the current. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetAnyButtonDown
Gets the button just pressed state of any hardware button. This will only return TRUE only on the first frame the button is pressed This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetAnyButtonPrev
Gets the previous button held state of any hardware button. This will return TRUE if any button was held in the previous frame. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetAnyButtonUp
Gets the button just released state of any hardware button. This will only return TRUE only on the first frame the button is released This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetAxis
Gets the current axis value.
(Inherited from ControllerWithAxes.)
Public methodGetAxis2D
Gets the current 2D axis value.
(Inherited from ControllerWithAxes.)
Public methodGetAxis2DPrev
Gets the 2D axis value from the previous frame.
(Inherited from ControllerWithAxes.)
Public methodGetAxis2DRaw
Gets the current raw 2D axis value. Excludes calibration.
(Inherited from ControllerWithAxes.)
Public methodGetAxis2DRawPrev
Gets the raw 2D axis value from the previous frame.. Excludes calibration.
(Inherited from ControllerWithAxes.)
Public methodGetAxisById
Gets the current axis value.
(Inherited from ControllerWithAxes.)
Public methodGetAxisIndexById
Gets the index of the Axis with the specified element idenfitier id.
(Inherited from ControllerWithAxes.)
Public methodGetAxisLastTimeActive (Inherited from ControllerWithAxes.)
Public methodGetAxisLastTimeActiveById (Inherited from ControllerWithAxes.)
Public methodGetAxisLastTimeInactive (Inherited from ControllerWithAxes.)
Public methodGetAxisLastTimeInactiveById (Inherited from ControllerWithAxes.)
Public methodGetAxisPrev
Gets the axis value from the previous frame.
(Inherited from ControllerWithAxes.)
Public methodGetAxisPrevById
Gets the axis value from the previous frame.
(Inherited from ControllerWithAxes.)
Public methodGetAxisRaw
Gets the current raw axis value. Excludes calibration.
(Inherited from ControllerWithAxes.)
Public methodGetAxisRawById
Gets the current raw axis value. Excludes calibration.
(Inherited from ControllerWithAxes.)
Public methodGetAxisRawLastTimeActive (Inherited from ControllerWithAxes.)
Public methodGetAxisRawLastTimeActiveById (Inherited from ControllerWithAxes.)
Public methodGetAxisRawLastTimeInactive (Inherited from ControllerWithAxes.)
Public methodGetAxisRawLastTimeInactiveById (Inherited from ControllerWithAxes.)
Public methodGetAxisRawPrev
Gets the raw axis value from the previous frame.. Excludes calibration.
(Inherited from ControllerWithAxes.)
Public methodGetAxisRawPrevById
Gets the raw axis value from the previous frame.. Excludes calibration.
(Inherited from ControllerWithAxes.)
Public methodGetAxisRawTimeActive (Inherited from ControllerWithAxes.)
Public methodGetAxisRawTimeActiveById (Inherited from ControllerWithAxes.)
Public methodGetAxisRawTimeInactive (Inherited from ControllerWithAxes.)
Public methodGetAxisRawTimeInactiveById (Inherited from ControllerWithAxes.)
Public methodGetAxisTimeActive (Inherited from ControllerWithAxes.)
Public methodGetAxisTimeActiveById (Inherited from ControllerWithAxes.)
Public methodGetAxisTimeInactive (Inherited from ControllerWithAxes.)
Public methodGetAxisTimeInactiveById (Inherited from ControllerWithAxes.)
Public methodGetButton
Gets the button held state of the hardware button at the specified index. This will return TRUE as long as the button is held. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonById
Gets the button held state of the hardware button at the specified element identifier id. This will return TRUE as long as the button is held. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonChanged
Returns true if the button has changed state from the previous frame to the current. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonDoublePressDown(Int32)
Gets the double press down state of the button at the specified index. This will return TRUE only on the first frame the double press is detected. This will use the default double press speed.
(Inherited from Controller.)
Public methodGetButtonDoublePressDown(Int32, Single)
Gets the double press down state of the button at the specified index. This will return TRUE only on the first frame the double press is detected.
(Inherited from Controller.)
Public methodGetButtonDoublePressDownById(Int32)
Gets the double press down state of the button at the specified element identifier id. This will return TRUE only on the first frame the double press is detected. This will use the default double press speed.
(Inherited from Controller.)
Public methodGetButtonDoublePressDownById(Int32, Single)
Gets the double press down state of the button at the specified element identifier id. This will return TRUE only on the first frame the double press is detected.
(Inherited from Controller.)
Public methodGetButtonDoublePressHold(Int32)
Gets the double press and hold state of the button at the specified index. This will return TRUE after the double press is detected and for as long as the button is held thereafter. This will use the default double press speed.
(Inherited from Controller.)
Public methodGetButtonDoublePressHold(Int32, Single)
Gets the double press and hold state of the button at the specified index. This will return TRUE after the double press is detected and for as long as the button is held thereafter.
(Inherited from Controller.)
Public methodGetButtonDoublePressHoldById(Int32)
Gets the double press and hold state of the button at the specified element identifier id. This will return TRUE after the double press is detected and for as long as the button is held thereafter. This will use the default double press speed.
(Inherited from Controller.)
Public methodGetButtonDoublePressHoldById(Int32, Single)
Gets the double press and hold state of the button at the specified element identifier id. This will return TRUE after the double press is detected and for as long as the button is held thereafter.
(Inherited from Controller.)
Public methodGetButtonDown
Gets the button just pressed state of the hardware button at the specified index. This will only return TRUE only on the first frame the button is pressed This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonDownById
Gets the button just pressed state of the hardware button at the specified element identifier id. This will only return TRUE only on the first frame the button is pressed This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonIndexById
Gets the index of the Button with the specified element idenfitier id.
(Inherited from Controller.)
Public methodGetButtonLastTimePressed
Gets the last timestamp the button at index was active.
(Inherited from Controller.)
Public methodGetButtonLastTimePressedById
Gets the last timestamp the button with the element identifier id was active.
(Inherited from Controller.)
Public methodGetButtonLastTimeUnpressed
Gets the last timestamp the button at index was inactive.
(Inherited from Controller.)
Public methodGetButtonLastTimeUnpressedById
Gets the last timestamp the button with the element identifier id was inactive.
(Inherited from Controller.)
Public methodGetButtonPrev
Gets the previous button held state of the hardware button at the specified index. This will return TRUE if the button was held in the previous frame. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonPrevById
Gets the previous button held state of the hardware button at the specified element identifier id. This will return TRUE if the button was held in the previous frame. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonTimePressed
Gets the length of time the button at index has been active.
(Inherited from Controller.)
Public methodGetButtonTimePressedById
Gets the length of time the button with the element identifier id has been active.
(Inherited from Controller.)
Public methodGetButtonTimeUnpressed
Gets the length of time the button at index has been inactive.
(Inherited from Controller.)
Public methodGetButtonTimeUnpressedById
Gets the length of time the button with the element identifier id has been inactive.
(Inherited from Controller.)
Public methodGetButtonUp
Gets the button just released state of the hardware button at the specified index. This will only return TRUE only on the first frame the button is released This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonUpById
Gets the button just released state of the hardware button at the specified element identifier id. This will only return TRUE only on the first frame the button is released This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetElementById
Gets the Element with the specified element identifier id.
(Inherited from ControllerWithAxes.)
Public methodGetElementIdentifierById
Gets a Controller Element Identifier by id.
(Inherited from Controller.)
Public methodGetExtensionT
Gets an object used to access controller and platform-specific controller functions.
(Inherited from Controller.)
Public methodGetLastTimeActive
Gets the last timestamp any axis or button was active. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from ControllerWithAxes.)
Public methodGetLastTimeActive(Boolean)
Gets the last timestamp any axis or button was active. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from ControllerWithAxes.)
Public methodGetLastTimeAnyAxisActive
Gets the last timestamp any axis was active. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from ControllerWithAxes.)
Public methodGetLastTimeAnyAxisActive(Boolean)
Gets the last timestamp any axis was active. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from ControllerWithAxes.)
Public methodGetLastTimeAnyAxisChanged
Gets the last timestamp any axis changed value. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from ControllerWithAxes.)
Public methodGetLastTimeAnyAxisChanged(Boolean)
Gets the last timestamp any axis changed value. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from ControllerWithAxes.)
Public methodGetLastTimeAnyButtonChanged
Gets the last timestamp any button's state changed. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from Controller.)
Public methodGetLastTimeAnyButtonPressed
Gets the last timestamp any button was active. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from Controller.)
Public methodGetLastTimeAnyElementChanged
Gets the last timestamp any element changed state. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from ControllerWithAxes.)
Public methodGetLastTimeAnyElementChanged(Boolean)
Gets the last timestamp any element changed state. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime. Use raw axis values
(Inherited from ControllerWithAxes.)
Public methodGetTemplate(Guid)
Gets a Controller Template by type GUID.
(Inherited from Controller.)
Public methodGetTemplate(Type)
Gets a Controller Template by type.
(Inherited from Controller.)
Public methodGetTemplateT
Gets the first Controller Template that implements the specified type. Note that it is possible to have multiple Controller Templates that implement a specific type of interface such as IControllerTemplate. You should use the most specific interface type possible such as IDualAnalogGamepadTemplate instead, which would be guaranteed to only apply to a single Controller Template.
(Inherited from Controller.)
Public methodImplementsTemplate(Guid)
Determines if the Controller implements a Controller Template by type GUID.
(Inherited from Controller.)
Public methodImplementsTemplate(Type)
Determines if the Controller implements a Controller Template by type.
(Inherited from Controller.)
Public methodImplementsTemplateT
Determines if the Controller implements a Controller Template by type.
(Inherited from Controller.)
Public methodImportCalibrationMapFromJsonString
Imports a Calibration Map from JSON.
(Inherited from ControllerWithAxes.)
Public methodImportCalibrationMapFromXmlString
Imports a Calibration Map from XML.
(Inherited from ControllerWithAxes.)
Public methodPollForAllAxes (Inherited from ControllerWithAxes.)
Public methodPollForAllButtons (Inherited from Controller.)
Public methodPollForAllButtonsDown (Inherited from Controller.)
Public methodPollForAllElements (Inherited from ControllerWithAxes.)
Public methodPollForAllElementsDown (Inherited from ControllerWithAxes.)
Public methodPollForFirstAxis (Inherited from ControllerWithAxes.)
Public methodPollForFirstButton (Inherited from Controller.)
Public methodPollForFirstButtonDown (Inherited from Controller.)
Public methodPollForFirstElement (Inherited from ControllerWithAxes.)
Public methodPollForFirstElementDown (Inherited from ControllerWithAxes.)
Public methodSetAxisUpdateCallback
Sets the callback delegate which is invoked when an Axis is updated.
Public methodSetAxisValue(Int32, Single)
Sets the value of an Axis by index.
Public methodSetAxisValue(String, Single)
Sets the value of an Axis by name.
Public methodSetAxisValueById
Sets the value of an Axis by id.
Public methodSetButtonUpdateCallback
Sets the callback delegate which is invoked when a Button is updated.
Public methodSetButtonValue(Int32, Boolean)
Sets the value of a Button by index.
Public methodSetButtonValue(String, Boolean)
Sets the value of an Button by name.
Public methodSetButtonValueById
Sets the value of an Button by id.
Top
Fields
  NameDescription
Public fieldid
Rewired unique id of this controller. This is not an index. The id is unique among controllers of a specific controller type.
(Inherited from Controller.)
Top
See Also