Split Screen Viewport Support in UMG
I made a HUD using UMG, but when I enter split screen mode only one HUD is drawn across the whole screen, rather than in each split screen. I'm adding the HUD to the Viewport in the PlayerController class. Is there a way to implement a split screen-compatible HUD using UMG?
That is not directly supported yet, as far as I know. I have implemented a workaround in C++ that basically includes the following steps:
Add blueprint library functions to register and unregister UMG UserWidgets to your project. Basically a single widget or a list of widgets per player. Whenever you add your UMG HUD to the viewport, also register it. Whenever you remove your UMG HUD, unregister it. You need to keep track of those widgets yourself since there is no way to get hold of them later in C++ - you only get references to the underlying Slate widgets.
Now subclass UGameViewportClient and override LayoutPlayers() and add code similar to what I posted below. This will update the anchors of the registered widgets to match the current splitscreen layout. I guess you need a Border widget or another container widget at the top of your UMG HUD for this to work since it will dynamically be resized and you want the rest of your HUD to stay within that container.
answered Oct 23 '14 at 03:36 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here