Skip to main content

ZepetoScreenTouchpad

ZEPETO.Character.Controller.ZepetoScreenTouchpad

Class designed to handle touchpad interactions in the ZEPETO environment.

Hierarchy

Constructors

constructor

new ZepetoScreenTouchpad()

Overrides

ZepetoScreenControl.constructor

Properties

OnDragEvent

OnDragEvent: UnityEvent$1<Vector2>

Event triggered when the touchpad is being dragged.


OnPointerDownEvent

OnPointerDownEvent: UnityEvent

Event triggered when the touchpad is pressed down.


OnPointerUpEvent

OnPointerUpEvent: UnityEvent

Event triggered when the touchpad is released.


canvasGroupTouchPadBackground

canvasGroupTouchPadBackground: CanvasGroup

Canvas group component used to manage the opacity and interaction of the touchpad's background.


touchHandle

touchHandle: RectTransform

RectTransform component representing the touch handle.


touchHandleAnimator

touchHandleAnimator: Animator

Animator component used to animate the touch handle.


touchHandleOrigin

touchHandleOrigin: RectTransform

RectTransform for the original position of the touch handle.


touchHandleOriginAnimator

touchHandleOriginAnimator: Animator

Animator component for the touch handle's origin point.


touchPadBackgroundCurve

touchPadBackgroundCurve: AnimationCurve

Animation curve for the touchpad's background fade in and out effect.

Methods

OnDrag

OnDrag($eventData): void

Manages the drag behavior, calculating the position delta and clamping it within the specified movement range. Triggers OnDragEvent with the normalized position value. Throws ArgumentNullException.

Parameters

NameTypeDescription
$eventDataPointerEventDataData related to the drag event.

Returns

void


OnPointerClick

OnPointerClick($eventData): void

Handles click events on the touchpad. Throws ArgumentNullException.

Parameters

NameTypeDescription
$eventDataPointerEventDataData related to the drag event.

Returns

void


OnPointerDown

OnPointerDown($eventData): void

Handles events when the user presses a UI control.

Parameters

NameTypeDescription
$eventDataPointerEventDataData related to the pointer down event.

Returns

void

Inherited from

ZepetoScreenControl.OnPointerDown


OnPointerUp

OnPointerUp($eventData): void

Handles events when the user releases a UI control.

Parameters

NameTypeDescription
$eventDataPointerEventDataData related to the pointer up event.

Returns

void

Inherited from

ZepetoScreenControl.OnPointerUp