RealDocs

UButton::GetPressMethod

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

Description

Returns the keyboard or gamepad button-press action currently required to trigger the button's click.

Caveats & Gotchas

  • Not UFUNCTION-tagged; Blueprint reads the equivalent value through the deprecated PressMethod property's native getter binding instead.
  • Governs keyboard/gamepad 'Confirm' style activation only — see GetClickMethod and GetTouchMethod for mouse and touch equivalents.

Signature

EButtonPressMethod::Type GetPressMethod() const;

Return Type

EButtonPressMethod::Type

Example

Check press behavior C++
if (Button->GetPressMethod() == EButtonPressMethod::ButtonPress)
{
    // Triggers immediately on button-down
}

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.