Show / Hide Table of Contents

Class RetainerBox

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

Inheritance
System.Object
UObject
Visual
Widget
PanelWidget
ContentWidget
RetainerBox
Inherited Members
ContentWidget.GetContent()
ContentWidget.GetContentSlot()
ContentWidget.SetContent(Widget)
PanelWidget.AddChild(Widget)
PanelWidget.ClearChildren()
PanelWidget.GetChildAt(Int32)
PanelWidget.GetChildIndex(Widget)
PanelWidget.GetChildrenCount()
PanelWidget.HasAnyChildren()
PanelWidget.HasChild(Widget)
PanelWidget.RemoveChild(Widget)
PanelWidget.RemoveChildAt(Int32)
PanelWidget.Slots
Widget.ForceLayoutPrepass()
Widget.ForceVolatile(Boolean)
Widget.GetCachedGeometry(Geometry)
Widget.GetClipping()
Widget.GetDesiredSize()
Widget.GetIsEnabled()
Widget.GetOwningLocalPlayer()
Widget.GetOwningPlayer()
Widget.GetParent()
Widget.GetRenderOpacity()
Widget.GetVisibility()
Widget.HasAnyUserFocus()
Widget.HasFocusedDescendants()
Widget.HasKeyboardFocus()
Widget.HasMouseCapture()
Widget.HasMouseCaptureByUser(Int32, Int32)
Widget.HasUserFocus(PlayerController)
Widget.HasUserFocusedDescendants(PlayerController)
Widget.InvalidateLayoutAndVolatility()
Widget.IsHovered()
Widget.IsVisible()
Widget.RemoveFromParent()
Widget.ResetCursor()
Widget.SetAllNavigationRules(EUINavigationRule, Name)
Widget.SetClipping(EWidgetClipping)
Widget.SetCursor(Byte)
Widget.SetIsEnabled(Boolean)
Widget.SetKeyboardFocus()
Widget.SetNavigationRule(EUINavigation, EUINavigationRule, Name)
Widget.SetRenderAngle(Single)
Widget.SetRenderOpacity(Single)
Widget.SetRenderScale(Vector2D)
Widget.SetRenderShear(Vector2D)
Widget.SetRenderTransform(WidgetTransform)
Widget.SetRenderTransformPivot(Vector2D)
Widget.SetRenderTranslation(Vector2D)
Widget.SetToolTip(Widget)
Widget.SetToolTipText(Byte)
Widget.SetUserFocus(PlayerController)
Widget.SetVisibility(ESlateVisibility)
Widget.Slot
Widget.ToolTipWidget
Widget.RenderTransform
Widget.RenderTransformPivot
Widget.bIsVariable
Widget.bCreatedByConstructionScript
Widget.bIsEnabled
Widget.bOverride_Cursor
Widget.bIsVolatile
Widget.bHiddenInDesigner
Widget.bExpandedInDesigner
Widget.bLockedInDesigner
Widget.Cursor
Widget.RenderOpacity
Widget.Navigation
Widget.NativeBindings
Widget.DesignerFlags
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.UMG
Assembly: UE4DotNet.dll
Syntax
public class RetainerBox : ContentWidget
Remarks

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

Properties

| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static RetainerBox DefaultObject { get; }
Property Value
Type Description
RetainerBox
| Improve this Doc View Source

EffectMaterial

The effect to optionally apply to the render target.

Declaration
public MaterialInterface EffectMaterial { get; }
Property Value
Type Description
MaterialInterface
Remarks

We will set the texture sampler based on the name set in the @TextureParameter property.

If you want to adjust transparency of the final image, make sure you set Blend Mode to AlphaComposite (Pre-Multiplied Alpha) and make sure to multiply the alpha you're apply across the surface to the color and the alpha of the render target, otherwise you won't see the expected color.

| Improve this Doc View Source

Phase

The Phase this widget will draw on.

Declaration
public int Phase { get; }
Property Value
Type Description
System.Int32
Remarks

If the Phase is 0, and the PhaseCount is 1, the widget will be drawn fresh every frame. If the Phase were 0, and the PhaseCount were 2, this retainer would draw a fresh frame every other frame. So in a 60Hz game, the UI would render at 30Hz.

| Improve this Doc View Source

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.

Declaration
public int PhaseCount { get; }
Property Value
Type Description
System.Int32
Remarks

If the Phase is 0, and the PhaseCount is 1, the widget will be drawn fresh every frame. If the Phase were 0, and the PhaseCount were 2, this retainer would draw a fresh frame every other frame. So in a 60Hz game, the UI would render at 30Hz.

| Improve this Doc View Source

RenderOnInvalidation

Declaration
public bool RenderOnInvalidation { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

RenderOnPhase

Declaration
public bool RenderOnPhase { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class
| Improve this Doc View Source

TextureParameter

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

Declaration
public Name TextureParameter { get; }
Property Value
Type Description
Name

Methods

| Improve this Doc View Source

GetEffectMaterial()

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

Declaration
public MaterialInstanceDynamic GetEffectMaterial()
Returns
Type Description
MaterialInstanceDynamic
| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

Declaration
public static RetainerBox New(UObject obj = null, Name name = default(Name))
Parameters
Type Name Description
UObject obj
Name name
Returns
Type Description
RetainerBox
| Improve this Doc View Source

RequestRender()

Requests the retainer redrawn the contents it has.

Declaration
public void RequestRender()
| Improve this Doc View Source

SetEffectMaterial(MaterialInterface)

Set a new effect material to the retainer widget.

Declaration
public void SetEffectMaterial(MaterialInterface EffectMaterial)
Parameters
Type Name Description
MaterialInterface EffectMaterial
| Improve this Doc View Source

SetRenderingPhase(Int32, Int32)

Requests the retainer redrawn the contents it has.

Declaration
public void SetRenderingPhase(int RenderPhase, int TotalPhases)
Parameters
Type Name Description
System.Int32 RenderPhase
System.Int32 TotalPhases
| Improve this Doc View Source

SetTextureParameter(Name)

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

Declaration
public void SetTextureParameter(Name TextureParameter)
Parameters
Type Name Description
Name TextureParameter

Operators

| Improve this Doc View Source

Implicit(IntPtr to RetainerBox)

Convert from IntPtr to UObject

Declaration
public static implicit operator RetainerBox(IntPtr p)
Parameters
Type Name Description
System.IntPtr p
Returns
Type Description
RetainerBox
  • Improve this Doc
  • View Source
Back to top Generated by DocFX