RealDocs

UButton::GetTouchMethod

function UMG Since 5.2
#include "Components/Button.h"
Access: public Specifiers: const

Description

Returns the touch action currently required to trigger the button's click on touch input devices.

Caveats & Gotchas

  • Not UFUNCTION-tagged; Blueprint reads the equivalent value through the deprecated TouchMethod property's native getter binding instead.
  • Only relevant on touch-capable platforms; has no effect on mouse or gamepad interaction.

Signature

EButtonTouchMethod::Type GetTouchMethod() const;

Return Type

EButtonTouchMethod::Type

Example

Check touch behavior C++
if (Button->GetTouchMethod() == EButtonTouchMethod::PreciseTap)
{
    // Requires tap and release inside the button bounds
}

Version History

Introduced in: 5.2

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.