My workaround to improve performance in 5.5
First, let’s describe the RetainerBox parameters:
RetainRender
- enables the material effect for child elements, so this should be true
RenderOnvalidation
- makes the RetainerBox content redrawn every time the widget is updated (for example, when the text changes)
RenderOnPhase
- makes the redrawing regular. If Phase = 0 and PhaseCount = 1, it will repaint every frame, and if Phase = 0 and PhaseCount = 2, it will repaint every other frame. But I didn’t understand how it would work if Phase is greater than 0.
What I did, for text UI elements I made the parameters RetainRender=true
and RenderOnvalidation=false
, thus RetainerBox is redrawn only if the text or its parameters have changed.
However, for graphic elements in which the change occurs at the level of dynamic material, this approach is not suitable. Unfortunately, in the widget BP it is impossible to set RenderOnPhase
, so I also have to do RetainRender=true
and RenderOnvalidation=false
, but I manually redraw RetainerBox
But for a widget with a RTT-based minimap this approach is not suitable and therefore it is necessary to do regular redrawing using a timer with specified frequency parameters. In this case, I update RetainerBox every second frame.
So, as a result, I got a decent performance with a fully functional HUD
Editor, cinematic with no FPS cap
The only my concern is memory consumption - it's huge!.