UButton::GetColorAndOpacity
#include "Components/Button.h"
Access: public
Specifiers: const
Description
Returns the color multiplier currently applied to the button's content (the widget placed inside it), including its alpha.
Caveats & Gotchas
- • Not itself UFUNCTION-tagged, so it isn't directly callable from Blueprint; Blueprint reads it through the ColorAndOpacity property's native getter.
- • This tints the child content, not the button's background — see GetBackgroundColor for the background tint.
Signature
FLinearColor GetColorAndOpacity() const; Return Type
FLinearColor Example
Read current tint C++
FLinearColor Tint = Button->GetColorAndOpacity();
if (Tint.A < 1.0f)
{
// Content is partially transparent
} Tags
Version History
Introduced in: 5.2
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?