UButton::SetColorAndOpacity
#include "Components/Button.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Sets the color and opacity multiplier applied to the button's child content, not its background.
Caveats & Gotchas
- • Tints the content placed inside the button (text, icon, etc.) — use SetBackgroundColor to tint the button's own background brush instead.
- • Alpha below 1.0 fades the content but the button remains fully clickable; it does not disable input.
Signature
UFUNCTION(BlueprintCallable, Category="Button|Appearance")
UMG_API void SetColorAndOpacity(FLinearColor InColorAndOpacity); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InColorAndOpacity | FLinearColor | The color and opacity multiplier to apply to the button's content. | — |
Return Type
void Example
Dim the button content C++
MyButton->SetColorAndOpacity(FLinearColor(1.f, 1.f, 1.f, 0.5f)); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?