Class OnScreenButton
A button that is visually represented on-screen and triggered by touch or other pointer input.
Implements
Inherited Members
Namespace: UnityEngine .InputSystem .OnScreen
Assembly: Unity.InputSystem.dll
Syntax
[AddComponentMenu("Input/On-Screen Button")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.inputsystem@1.13/manual/OnScreen.html#on-screen-buttons")]
public class OnScreenButton : OnScreenControl, IPointerDownHandler, IPointerUpHandler, IEventSystemHandler
Properties
controlPathInternal
Accessor for the control
Declaration
protected override string controlPathInternal { get; set; }
Property Value
Type | Description |
---|---|
string |
Overrides
Remarks
Moving the definition of how the control path is stored into subclasses allows them to
apply their own Input
Methods
OnPointerDown(PointerEventData)
Use this callback to detect pointer down events.
Declaration
public void OnPointerDown(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
Pointer |
eventData |
OnPointerUp(PointerEventData)
Use this callback to detect pointer up events.
Declaration
public void OnPointerUp(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
Pointer |
eventData |