URetainerBox

The Retainer Box renders children widgets to a render target first before later rendering that render target to the screen.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Components/RetainerBox.h

Include

#include "Components/RetainerBox.h"

Syntax

class URetainerBox : public UContentWidget

Remarks

The Retainer Box renders children widgets to a render target first before later rendering that render target to the screen. This allows both frequency and phase to be controlled so that the UI can actually render less often than the frequency of the main game render. It also has the side benefit of allow materials to be applied to the render target after drawing the widgets to apply a simple post process.

  • Single Child

  • Caching / Performance

Variables

Name Description

Protected variable

UMaterialInterf...

 

EffectMaterial

The effect to optionally apply to the render target.

Protected variable

TSharedPtr< cla...

 

MyRetainerWidget

Public variable

int32

 

Phase

The Phase this widget will draw on.

Public variable

int32

 

PhaseCount

The PhaseCount controls how many phases are possible know what to modulus the current frame count by to determine if this is the current frame to draw the widget on.

Public variable

bool

 

RenderOnInvalidation

Should this widget redraw the contents it has every time it receives an invalidation request from it's children, similar to the invalidation panel.

Public variable

bool

 

RenderOnPhase

Should this widget redraw the contents it has every time the phase occurs.

Protected variable

FName

 

TextureParameter

The texture sampler parameter of the , that we'll set to the render target.

Constructors

Name Description

Public function

URetainerBox

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

FGeometry

 

GetCachedAllottedGeometry()

Public function Const

UMaterialIns...

 

GetEffectMaterial()

Get the current dynamic effect material applied to the retainer box.

Public function

void

 

RequestRender()

Requests the retainer redrawn the contents it has.

Public function

void

 

SetEffectMaterial

(
    UMaterialInterface* EffectMate...
)

Set a new effect material to the retainer widget.

Public function

void

 

SetRenderingPhase

(
    int RenderPhase,
    int32 TotalPhases
)

Requests the retainer redrawn the contents it has.

Public function

void

 

SetTextureParameter

(
    FName TextureParameter
)

Sets the name of the texture parameter to set the render target to on the material.

Overridden from UPanelWidget

Name Description

Protected function Virtual

void

 

OnSlotAdded

(
    UPanelSlot* Slot
)

UPanelWidget.

Protected function Virtual

void

 

OnSlotRemoved

(
    UPanelSlot* Slot
)

Overridden from UWidget

Name Description

Public function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Protected function Virtual

void

 

SynchronizeProperties()

Applies all properties to the native widget if possible.

Overridden from UVisual

Name Description

Public function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss