A stick control displayed on screen and moved around by touch or other pointer
input.
Inheritance
OnScreenStick
[AddComponentMenu("Input/On-Screen Stick")]
[HelpURL("https://docs.unity.cn/Packages/com.unity.inputsystem@1.4/manual/OnScreen.html#on-screen-sticks")]
public class OnScreenStick : OnScreenControl, IPointerDownHandler, IPointerUpHandler, IDragHandler, IEventSystemHandler
Properties
Declaration
protected override string controlPathInternal { get; set; }
Property Value
Overrides
Declaration
public float movementRange { get; set; }
Property Value
Methods
Declaration
public void OnDrag(PointerEventData eventData)
Parameters
Type |
Name |
Description |
UnityEngine.EventSystems.PointerEventData |
eventData |
|
Implements
UnityEngine.EventSystems.IDragHandler.OnDrag(UnityEngine.EventSystems.PointerEventData)
Declaration
public void OnPointerDown(PointerEventData eventData)
Parameters
Type |
Name |
Description |
UnityEngine.EventSystems.PointerEventData |
eventData |
|
Implements
UnityEngine.EventSystems.IPointerDownHandler.OnPointerDown(UnityEngine.EventSystems.PointerEventData)
Declaration
public void OnPointerUp(PointerEventData eventData)
Parameters
Type |
Name |
Description |
UnityEngine.EventSystems.PointerEventData |
eventData |
|
Implements
UnityEngine.EventSystems.IPointerUpHandler.OnPointerUp(UnityEngine.EventSystems.PointerEventData)