RealDocs

UBorder::SetBrushFromAsset

function UMG Blueprint Since 4.0
#include "Components/Border.h"
Access: public Specifiers: UFUNCTIONBlueprintCallable

Description

Sets the border's background brush by copying the brush definition from a USlateBrushAsset.

Caveats & Gotchas

  • USlateBrushAsset is a legacy Slate-era asset type largely superseded by authoring brushes directly on the widget; new projects rarely create these assets.
  • Passing nullptr assigns an empty brush, which makes the border's background effectively invisible.

Signature

UMG_API void SetBrushFromAsset(USlateBrushAsset* Asset)

Parameters

Name Type Description Default
Asset USlateBrushAsset* Slate brush asset whose brush definition should be copied onto the border.

Return Type

void

Example

Apply a brush asset C++
void UMyUserWidget::ApplyLegacyBrushAsset(USlateBrushAsset* BrushAsset)
{
    if (MyBorder && BrushAsset)
    {
        MyBorder->SetBrushFromAsset(BrushAsset);
    }
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.