Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/Components
Inheritance Hierarchy
- UObject
- UVisual
- UWidget
- UPanelWidget
- UContentWidget
- URetainerBox
References
| Module | UMG |
| Header | /Engine/Source/Runtime/UMG/Public/Components/RetainerBox.h |
| Include | #include "Components/RetainerBox.h" |
Syntax
UCLASS (MinimalAPI)
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
| Type | Name | Description | |
|---|---|---|---|
| bool | bRetainRender | ||
| bool | bShowEffectsInDesigner | If true, retained rendering occurs in designer | |
| TObjectPtr< UMaterialInterface > | EffectMaterial | The effect to optionally apply to the render target. | |
| TSharedPtr< class SRetainerWidget > | MyRetainerWidget | ||
| int32 | Phase | The Phase this widget will draw on. | |
| 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. | |
| 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. | |
| bool | RenderOnPhase | Should this widget redraw the contents it has every time the phase occurs. | |
| FName | TextureParameter | The texture sampler parameter of the @EffectMaterial, that we'll set to the render target. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
URetainerBox
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | CanEditChange
(
const FProperty* InProperty |
||
| FGeometry | |||
| UMaterialInstanceDynamic * | Get the current dynamic effect material applied to the retainer box. | ||
| const UMaterialInterface * | Gets the current dynamic effect material applied to the retainer box. | ||
| int32 | GetPhase () |
Get the phase to render on. | |
| int32 | Get the total number of phases. | ||
| const FName & | Gets the name of the texture parameter to set the render target to on the material. | ||
| void | InitPhase
(
int32 InPhase |
Initialize Phase in the constructor before the SWidget is constructed. | |
| void | InitPhaseCount
(
int32 InPhaseCount |
Initialize PhaseCount in the constructor before the SWidget is constructed. | |
| void | InitRenderOnInvalidation
(
bool InRenderOnInvalidation |
Initialize RenderOnInvalidation in the constructor before the SWidget is constructed. | |
| void | InitRenderOnPhase
(
bool InRenderOnPhase |
Initialize RenderOnPhase in the constructor before the SWidget is constructed. | |
| bool | Get whether this widget should redraw the contents it has every time it receives an invalidation request. | ||
| bool | Get whether this widget should redraw the contents it has every time the phase occurs. | ||
| bool | Get the flag for if we retain the render or pass-through. | ||
| void | Requests the retainer redrawn the contents it has. | ||
| void | SetEffectMaterial
(
UMaterialInterface* EffectMaterial |
Set a new effect material to the retainer widget. | |
| void | SetRenderingPhase
(
int32 RenderPhase, |
Requests the retainer redrawn the contents it has. | |
| void | SetRetainRendering
(
bool bInRetainRendering |
Set the flag for if we retain the render or pass-through | |
| void | SetTextureParameter
(
FName TextureParameter |
Sets the name of the texture parameter to set the render target to on the material. |
Overridden from UPanelWidget
| Type | Name | Description | |
|---|---|---|---|
| void | OnSlotAdded
(
UPanelSlot* Slot |
||
| void | OnSlotRemoved
(
UPanelSlot* Slot |
Overridden from UWidget
| Type | Name | Description | |
|---|---|---|---|
| const FText | Gets the palette category of the widget | ||
| TSharedRef< SWidget > | Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | ||
| void | Applies all properties to the native widget if possible. |
Overridden from UVisual
| Type | Name | Description | |
|---|---|---|---|
| void | ReleaseSlateResources
(
bool bReleaseChildren |