UButton::SetTouchMethod
#include "Components/Button.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Sets which touch interaction pattern triggers the button's OnClicked event on touch-input platforms.
Caveats & Gotchas
- • PreciseTap matters when the button lives inside a scrollable list — it prevents a swipe-to-scroll gesture from being misread as a tap on the button underneath the finger.
- • Only affects touch input; mouse and keyboard/gamepad triggering are controlled separately by SetClickMethod and SetPressMethod.
Signature
UFUNCTION(BlueprintCallable, Category="Button")
UMG_API void SetTouchMethod(EButtonTouchMethod::Type InTouchMethod); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InTouchMethod | EButtonTouchMethod::Type | How a touch action should trigger the button's click: DownAndUp, Down, or PreciseTap. | — |
Return Type
void Example
Require a precise tap inside a scrollable list C++
MyButton->SetTouchMethod(EButtonTouchMethod::PreciseTap); Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?