Class OnScreenButton
A button that is visually represented on-screen and triggered by touch or other pointer input.
Inherited Members
Namespace: UnityEngine.InputSystem.OnScreen
Syntax
[AddComponentMenu("Input/On-Screen Button")]
[HelpURL("https://docs.unity.cn/Packages/com.unity.inputsystem@1.4/manual/OnScreen.html#on-screen-buttons")]
public class OnScreenButton : OnScreenControl, IPointerDownHandler, IPointerUpHandler, IEventSystemHandler
Properties
controlPathInternal
Declaration
protected override string controlPathInternal { get; set; }
Property Value
Type | Description |
---|---|
String |
Overrides
Methods
OnPointerDown(PointerEventData)
Declaration
public void OnPointerDown(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.EventSystems.PointerEventData | eventData |
Implements
UnityEngine.EventSystems.IPointerDownHandler.OnPointerDown(UnityEngine.EventSystems.PointerEventData)
OnPointerUp(PointerEventData)
Declaration
public void OnPointerUp(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.EventSystems.PointerEventData | eventData |
Implements
UnityEngine.EventSystems.IPointerUpHandler.OnPointerUp(UnityEngine.EventSystems.PointerEventData)