TouchJoystick Class |
Namespace: Rewired.ComponentControls
[SerializableAttribute] public sealed class TouchJoystick : TouchInteractable
The TouchJoystick type exposes the following members.
Name | Description | |
---|---|---|
![]() | activateOnSwipeIn |
If true, the joystick can be activated by a touch swipe that began in an area outside the joystick region. If false, the joystick can only be activated by a direct touch.
|
![]() | allowedMouseButtons |
The mouse buttons that are allowed to interact with this control.
(Inherited from TouchInteractable.) |
![]() | allowTap |
Should taps on the touch pad be processed?
|
![]() | animateOnMoveToTouch |
Should the joystick animate when moving to the touch point? This only has an effect if Move To Touch Position is True and a Touch Region is set. This setting is ignored if Follow Touch Position is True.
|
![]() | animateOnReturn |
Should the joystick animate when moving back to its original position? This only has an effect if Follow Touch Position is True, or if Move To Touch Position is True and a Touch Region is set, and Return on Release is True.
|
![]() | animation | Obsolete. (Inherited from Component.) |
![]() | animator |
Gets the Animator component on this GameObject. Returns null if no Animator component is found.
(Inherited from TouchInteractable.) |
![]() | audio | Obsolete. (Inherited from Component.) |
![]() | axesToUse |
The axis directions in which movement is allowed. You can restrict movement to one or both axes.
|
![]() | axis2DCalibration |
The calibration settings for the 2D axis.
|
![]() | camera | Obsolete. (Inherited from Component.) |
![]() | centerStickOnRelease |
If true, the stick will return to the center after it is released. Otherwise, the stick will remain in the last position and continue to return input.
|
![]() | collider | Obsolete. (Inherited from Component.) |
![]() | collider2D | Obsolete. (Inherited from Component.) |
![]() | constantForce | Obsolete. (Inherited from Component.) |
![]() | deadZoneType | Obsolete.
The calibration settings for the 2D axis.
|
![]() | digitalModeDeadZone |
A dead zone which is applied when Stick Mode is set to Digital. This is used to filter out tiny stick movements near 0, 0.
|
![]() | enabled | (Inherited from Behaviour.) |
![]() | followTouchPosition |
If True, the joystick will follow the touch around until released. This setting overrides Move To Touch Position.
|
![]() | gameObject | (Inherited from Component.) |
![]() | guiElement | Obsolete. (Inherited from Component.) |
![]() | guiText | Obsolete. (Inherited from Component.) |
![]() | guiTexture | Obsolete. (Inherited from Component.) |
![]() | hasPointer |
Is this joystick currently being controlled by a touch or pointer?
|
![]() | hideFlags | (Inherited from Object.) |
![]() | hideWhenIdle |
Sets visibility to False when the control is idle. When the control is no longer idle, visibility will be set to True again.
(Inherited from TouchInteractable.) |
![]() | hingeJoint | Obsolete. (Inherited from Component.) |
![]() | horizontalAxisCalibration |
The calibration settings for the horizontal axis.
|
![]() | horizontalAxisCustomControllerElement |
The Custom Controller element(s) that will receive input values from the joystick's X axis.
|
![]() | image |
Gets the Target Graphic as an Image. If the Target Graphic is not an Image, this will return null.
(Inherited from TouchInteractable.) |
![]() | interactable |
Can the control can be interacted with by the user?
(Inherited from TouchInteractable.) |
![]() | interactionState |
The current interaction state.
(Inherited from TouchInteractable.) |
![]() | isActiveAndEnabled | (Inherited from Behaviour.) |
![]() | joystickMode |
The joystick's mode of operation. Set this to Digital to simulate a D-Pad which has only On/Off states. If you want mimic a real D-Pad, you should also set Snap Directions to 8.
|
![]() | light | Obsolete. (Inherited from Component.) |
![]() | manageRaycasting |
If True, it will attempt to automatically manage Graphic component raycasting for best results based on your current settings.
|
![]() | moveToTouchPosition |
If True, the joystick will move to the location of the current touch in the Touch Region. This can be used to designate an area of the screen as a hot-spot for a joystick and have the joystick graphics follow the users touches. This only has an effect if a Touch Region is set.
|
![]() | moveToTouchSpeed |
The speed at which the joystick will move toward the touch position measured in screens per second (based on the larger of width and height). [1.0 = Move 1 screen/sec]. This only has an effect if Move To Touch Position is True, Animate On Move To Touch is true, and a Touch Region is set. This setting is ignored if Follow Touch Position is True.
|
![]() | name | (Inherited from Object.) |
![]() | networkView | Obsolete. (Inherited from Component.) |
![]() | particleSystem | Obsolete. (Inherited from Component.) |
![]() | pointerId |
The pointer id that currently has control of this joystick. If there is no pointer id, the value is TouchControl.POINTER_ID_NULL.
Only one pointer id (touch, mouse, etc.) may be in control of this joystick at any time.
|
![]() | renderer | Obsolete. (Inherited from Component.) |
![]() | returnOnRelease |
If Move To Touch Position is enabled, this will make the joystick return to its original position after the press is released. This only has an effect if a Touch Region is set.
|
![]() | returnSpeed |
The speed at which the joystick will move back toward its original position measured in screens per second (based on the larger of width and height). [1.0 = Move 1 screen/sec]. This only has an effect if Follow Touch Position is True, or if Move To Touch Position is True and a Touch Region is set, and Return on Release and Animate on Return are both True.
|
![]() | rigidbody | Obsolete. (Inherited from Component.) |
![]() | rigidbody2D | Obsolete. (Inherited from Component.) |
![]() | runInEditMode | (Inherited from MonoBehaviour.) |
![]() | scaleStickRange |
If enabled, the stick range will scale with parent controls. Otherwise, the stick range will remain constant.
|
![]() | snapDirections |
Snaps joystick movement to a fixed number of directions. This can be used to create a D-Pad, for example, setting it to 4 or 8 directions. If you want a true D-Pad, Stick Mode should be set to digital.
|
![]() | snapStickToTouch |
If true, the stick disc will snap immediately to the touch position when initially touched. This results in the stick disc being centered to the touch position.
This will cause the stick to generate input immediately when touched if not touched perfectly centered.
If false, the stick disc will remain in its current position on touch, and when dragged will retain the same offset.
The stick's center point will be set to the position of the touch. The initial touch will not cause the stick to pop in any direction.
|
![]() | stayActiveOnSwipeOut |
If true, the joystick will stay engaged even if the touch that activated it moves outside the joystick region.
If false, the joystick will be released once the touch that activated it moves outside the joystick region.
|
![]() | stickRange |
The range of movement of the stick in Canvas pixels. The larger the number, the further the stick must be moved from center to register movement.
|
![]() | stickTransform |
The Rect Transform of the stick disc. This is moved around by the user when manipulating the joystick.
|
![]() | tag | (Inherited from Component.) |
![]() | tapCustomControllerElement |
The Custom Controller element that will receive input values from taps.
|
![]() | tapDistanceLimit |
The maximum movement distance allowed in pixels since the touch began for the touch to be considered a tap. [-1 = no limit]
|
![]() | tapTimeout |
The maximum touch duration allowed for the touch to be considered a tap.
|
![]() | targetGraphic |
The target Graphic component for interaction state transitions.
(Inherited from TouchInteractable.) |
![]() | touchRegion |
Optional external region to use for hover/click/touch detection. If set, this region will be used for touch detection instead of or in addition to the joystick's RectTransform. This can be useful if you want a larger area of the screen to act as a joystick.
|
![]() | transform | (Inherited from Component.) |
![]() | transitionAnimationTriggers |
Settings using for Animation Trigger transitions.
(Inherited from TouchInteractable.) |
![]() | transitionColorTint |
Settings using for Color Tins transitions.
(Inherited from TouchInteractable.) |
![]() | transitionSpriteState |
Settings using for Sprite State transitions.
(Inherited from TouchInteractable.) |
![]() | transitionType |
The transition type(s) to be used when transitioning to various states. Multiple transition types can be used simultaneously. Denote multiple transition types using bitwise operations.
(Inherited from TouchInteractable.) |
![]() | useGUILayout | (Inherited from MonoBehaviour.) |
![]() | useTouchRegionOnly |
If True, hovers/clicks/touches on the local joystick will be ignored and only Touch Region touches will be used. Otherwise, both touches on the joystick and on the Touch Region will be used. This also applies to mouse hover. This setting has no effect if no Touch Region is set.
|
![]() | verticalAxisCalibration |
The calibration settings for the vertical axis.
|
![]() | verticalAxisCustomControllerElement |
The Custom Controller element(s) that will receive input values from the joystick's Y axis.
|
![]() | visible |
Is the control visible? An invisible control can still be interacted with. This property only has any effect when used with an Image Component.
(Inherited from TouchInteractable.) |
Name | Description | |
---|---|---|
![]() | BroadcastMessage(String) | (Inherited from Component.) |
![]() | BroadcastMessage(String, Object) | (Inherited from Component.) |
![]() | BroadcastMessage(String, SendMessageOptions) | (Inherited from Component.) |
![]() | BroadcastMessage(String, Object, SendMessageOptions) | (Inherited from Component.) |
![]() | CancelInvoke | (Inherited from MonoBehaviour.) |
![]() | CancelInvoke(String) | (Inherited from MonoBehaviour.) |
![]() | ClearValue | (Overrides ComponentControlClearValue.) |
![]() | CompareTag | (Inherited from Component.) |
![]() | Equals | (Inherited from Object.) |
![]() | GetComponent(Type) | (Inherited from Component.) |
![]() | GetComponent(String) | (Inherited from Component.) |
![]() | GetComponent``1 | (Inherited from Component.) |
![]() | GetComponentInChildren(Type) | (Inherited from Component.) |
![]() | GetComponentInChildren(Type, Boolean) | (Inherited from Component.) |
![]() | GetComponentInChildren``1 | (Inherited from Component.) |
![]() | GetComponentInChildren``1(Boolean) | (Inherited from Component.) |
![]() | GetComponentInParent(Type) | (Inherited from Component.) |
![]() | GetComponentInParent``1 | (Inherited from Component.) |
![]() | GetComponents(Type) | (Inherited from Component.) |
![]() | GetComponents(Type, ListComponent) | (Inherited from Component.) |
![]() | GetComponents``1 | (Inherited from Component.) |
![]() | GetComponents``1(ListUMP) | (Inherited from Component.) |
![]() | GetComponentsInChildren(Type) | (Inherited from Component.) |
![]() | GetComponentsInChildren(Type, Boolean) | (Inherited from Component.) |
![]() | GetComponentsInChildren``1 | (Inherited from Component.) |
![]() | GetComponentsInChildren``1(Boolean) | (Inherited from Component.) |
![]() | GetComponentsInChildren``1(ListUMP) | (Inherited from Component.) |
![]() | GetComponentsInChildren``1(Boolean, ListUMP) | (Inherited from Component.) |
![]() | GetComponentsInParent(Type) | (Inherited from Component.) |
![]() | GetComponentsInParent(Type, Boolean) | (Inherited from Component.) |
![]() | GetComponentsInParent``1 | (Inherited from Component.) |
![]() | GetComponentsInParent``1(Boolean) | (Inherited from Component.) |
![]() | GetComponentsInParent``1(Boolean, ListUMP) | (Inherited from Component.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetInstanceID | (Inherited from Object.) |
![]() | GetRawValue |
Gets the raw value of the joystick.
|
![]() | GetValue |
Gets the calibrated value of the joystick.
|
![]() | Invoke | (Inherited from MonoBehaviour.) |
![]() | InvokeRepeating | (Inherited from MonoBehaviour.) |
![]() | IsInteractable | (Inherited from TouchInteractable.) |
![]() | IsInvoking | (Inherited from MonoBehaviour.) |
![]() | IsInvoking(String) | (Inherited from MonoBehaviour.) |
![]() | ReturnToDefaultPosition |
Moves the joystick to the default position.
|
![]() | ReturnToDefaultPosition(Boolean) |
Moves the joystick to the default position.
|
![]() | SendMessage(String) | (Inherited from Component.) |
![]() | SendMessage(String, Object) | (Inherited from Component.) |
![]() | SendMessage(String, SendMessageOptions) | (Inherited from Component.) |
![]() | SendMessage(String, Object, SendMessageOptions) | (Inherited from Component.) |
![]() | SendMessageUpwards(String) | (Inherited from Component.) |
![]() | SendMessageUpwards(String, Object) | (Inherited from Component.) |
![]() | SendMessageUpwards(String, SendMessageOptions) | (Inherited from Component.) |
![]() | SendMessageUpwards(String, Object, SendMessageOptions) | (Inherited from Component.) |
![]() | SetDefaultPosition |
Record the current anchored position as the joystick's default position.
The joystick will return to this position when released when using a
Touch Region with moveToTouchPosition set to True.
If you move the joystick's position and want it to return there next time,
you should record the new default position by calling this method.
|
![]() | SetRawValue |
Set the raw value of the joystick.
|
![]() | StartCoroutine(String) | (Inherited from MonoBehaviour.) |
![]() | StartCoroutine(IEnumerator) | (Inherited from MonoBehaviour.) |
![]() | StartCoroutine(String, Object) | (Inherited from MonoBehaviour.) |
![]() | StartCoroutine_Auto | Obsolete. (Inherited from MonoBehaviour.) |
![]() | StopAllCoroutines | (Inherited from MonoBehaviour.) |
![]() | StopCoroutine(IEnumerator) | (Inherited from MonoBehaviour.) |
![]() | StopCoroutine(Coroutine) | (Inherited from MonoBehaviour.) |
![]() | StopCoroutine(String) | (Inherited from MonoBehaviour.) |
![]() | ToString | (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() | InteractionStateChangedToDisabled |
Event sent when interaction state changes to Disabled.
(Inherited from TouchInteractable.) |
![]() | InteractionStateChangedToHighlighted |
Event sent when interaction state changes to Highlighted.
(Inherited from TouchInteractable.) |
![]() | InteractionStateChangedToNormal |
Event sent when interaction state changes to Normal.
(Inherited from TouchInteractable.) |
![]() | InteractionStateChangedToPressed |
Event sent when interaction state changes to Pressed.
(Inherited from TouchInteractable.) |
![]() | InteractionStateSetEvent |
Event sent when the Interaction State changes.
(Inherited from TouchInteractable.) |
![]() | StickPositionChangedEvent |
Event sent when the joystick's stick position changes.
|
![]() | TapEvent |
Event sent when the touch pad is tapped.
This event will only be sent if allowTap is True.
|
![]() | TouchDownEvent | |
![]() | TouchUpEvent | |
![]() | ValueChangedEvent |
Event sent when the joystick value changes.
|
![]() | VisibilityChangedEvent |
Event sent when visibility changes.
(Inherited from TouchInteractable.) |