I’d really like some sort of blueprint-implementable event in SWidget that fires on layout update/invalidation so I know exactly when to render VR UI widgets and not do this every frame or reinvent another bicycle. It’s not much of a problem rendering widgets every frame - IF they have a really simple non-nested layout, but rendering complex tables (like vertical box->child wrappers->horizontal box) effectively kills fps.
Have you tried the Retainer box?
/**
- 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
*/
- Caching / Performance
It would be much easier for me to just use the retainer box, but its render target is not exposed, and I had to implement my own widget-to-texture rendering pipeline. It’s not like UE team is going to improve UMG anytime soon so small changes is all I can hope for.