UButton::GetStyle
#include "Components/Button.h"
Access: public
Specifiers: const
Description
Returns the button's current visual style, including the brushes used for its normal, hovered, pressed, and disabled states.
Caveats & Gotchas
- • Has no UFUNCTION macro of its own, so it can't be called from Blueprint directly — Blueprint reads the equivalent value through the WidgetStyle property's native getter binding instead.
- • Added in 5.2 to replace direct access to the now-deprecated WidgetStyle property; prefer this over reading WidgetStyle directly.
Signature
const FButtonStyle& GetStyle() const; Return Type
const FButtonStyle& Example
Read the current style C++
const FButtonStyle& Style = Button->GetStyle();
const FSlateBrush& NormalBrush = Style.Normal; See Also
Tags
Version History
Introduced in: 5.2
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?