Navigation
API > API/Runtime > API/Runtime/UMG
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
| Name | URetainerBox |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Components/RetainerBox.h |
| Include Path | #include "Components/RetainerBox.h" |
Syntax
UCLASS (MinimalAPI)
class URetainerBox : public UContentWidget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → UPanelWidget → UContentWidget → URetainerBox
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
URetainerBox
(
const FObjectInitializer& ObjectInitializer |
Components/RetainerBox.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Phase | int32 | The Phase this widget will draw on. | Components/RetainerBox.h |
|
| PhaseCount | int32 | 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. | Components/RetainerBox.h |
|
| RenderOnInvalidation | bool | Should this widget redraw the contents it has every time it receives an invalidation request from it's children, similar to the invalidation panel. | Components/RetainerBox.h |
|
| RenderOnPhase | bool | Should this widget redraw the contents it has every time the phase occurs. | Components/RetainerBox.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGeometry GetCachedAllottedGeometry() |
Components/RetainerBox.h | ||
UMaterialInstanceDynamic * GetEffectMaterial() |
Get the current dynamic effect material applied to the retainer box. | Components/RetainerBox.h |
|
const UMaterialInterface * GetEffectMaterialInterface() |
Gets the current dynamic effect material applied to the retainer box. | Components/RetainerBox.h | |
int32 GetPhase() |
Get the phase to render on. | Components/RetainerBox.h | |
int32 GetPhaseCount() |
Get the total number of phases. | Components/RetainerBox.h | |
const FName & GetTextureParameter() |
Gets the name of the texture parameter to set the render target to on the material. | Components/RetainerBox.h | |
bool IsRenderOnInvalidation() |
Get whether this widget should redraw the contents it has every time it receives an invalidation request. | Components/RetainerBox.h | |
bool IsRenderOnPhase() |
Get whether this widget should redraw the contents it has every time the phase occurs. | Components/RetainerBox.h | |
bool IsRetainRendering() |
Get the flag for if we retain the render or pass-through. | Components/RetainerBox.h | |
void RequestRender() |
Requests the retainer redrawn the contents it has. | Components/RetainerBox.h |
|
void SetEffectMaterial
(
UMaterialInterface* EffectMaterial |
Set a new effect material to the retainer widget. | Components/RetainerBox.h |
|
void SetRenderingPhase
(
int32 RenderPhase, |
Requests the retainer redrawn the contents it has. | Components/RetainerBox.h |
|
void SetRetainRendering
(
bool bInRetainRendering |
Set the flag for if we retain the render or pass-through | Components/RetainerBox.h |
|
void SetTextureParameter
(
FName TextureParameter |
Sets the name of the texture parameter to set the render target to on the material. | Components/RetainerBox.h |
|
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FText GetPaletteCategory() |
Gets the palette category of the widget | Components/RetainerBox.h |
Overridden from UVisual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseSlateResources
(
bool bReleaseChildren |
Components/RetainerBox.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void InitPhase
(
int32 InPhase |
Initialize Phase in the constructor before the SWidget is constructed. | Components/RetainerBox.h | |
void InitPhaseCount
(
int32 InPhaseCount |
Initialize PhaseCount in the constructor before the SWidget is constructed. | Components/RetainerBox.h | |
void InitRenderOnInvalidation
(
bool InRenderOnInvalidation |
Initialize RenderOnInvalidation in the constructor before the SWidget is constructed. | Components/RetainerBox.h | |
void InitRenderOnPhase
(
bool InRenderOnPhase |
Initialize RenderOnPhase in the constructor before the SWidget is constructed. | Components/RetainerBox.h |
Overridden from UPanelWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnSlotAdded
(
UPanelSlot* Slot |
Components/RetainerBox.h | ||
virtual void OnSlotRemoved
(
UPanelSlot* Slot |
Components/RetainerBox.h |
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedRef< SWidget > RebuildWidget() |
Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | Components/RetainerBox.h | |
virtual void SynchronizeProperties () |
Applies all properties to the native widget if possible. | Components/RetainerBox.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanEditChange
(
const FProperty* InProperty |
Components/RetainerBox.h |