RealDocs

UBorder::SetDesiredSizeScale

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

Description

Scales the border's computed desired size, useful for animating things like slide-open panels without hard-coding their target size.

Caveats & Gotchas

  • Has no effect if the parent widget or slot is configured to ignore this widget's desired size, e.g. a fill-type slot.
  • The direct DesiredSizeScale UPROPERTY is deprecated as of 5.1 in favor of this setter.

Signature

UMG_API void SetDesiredSizeScale(FVector2D InScale)

Parameters

Name Type Description Default
InScale FVector2D X and Y multipliers applied to the border's computed desired size.

Return Type

void

Example

Animate a slide-open panel C++
void UMyUserWidget::UpdateSlideOpenScale(float Alpha)
{
    if (MyBorder)
    {
        MyBorder->SetDesiredSizeScale(FVector2D(1.f, Alpha));
    }
}

Tags

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.