How to specify which screen to show a UMG widget on when using nDisplay

Part of the question is that we need a source of best practices for using UMG with nDisplay.

The main part of our issue is that our logic needs to specify which screen a UMG widget will pop up on. If we place a widget on the left side of the screen in UMG, it appears on the left-most screen. Instead we would like to be able to freely determine the exact screen it will appear on.

Since some of our setups use 2 screens and others 3 screens we would need some sort of fallback (eg. if we design a UI for 3 screens but for reasons outside of our control a given runtime setup uses only 2). Ideally whatever the setup, the UMG widget should never appear in the “Main” viewport.

Tldr: We want our logic to be able to specify which screen a UMG widget shows up on (could be through a widget base class with an exposed enum for example, but it is important for us to know the best practice/usual workflow for this)

Attaching the nDisplay configs. Keep in mind that the solution we need should be screen agnostic, i.e. it should work for any number of screens.

nDisplay plugin version:

FileVersion: 3,

Version: 1,

VersionName: 1.0

[Attachment Removed]

Hello.

You will need to query the nDisplay config from within the widget to get the viewport information as configured. From there you can map your UI accordingly. In this quick example (see screenshot) I am demonstrating querying the position X of a specific viewport. In this case I set a variable which is a the viewport.

Worth mentioning though that UMG is rendered after nDisplay projection policy and therefore your UI will not receive mesh distortion. However if the widget is a component of a blueprint in the level (and therefore in 3D world space) it does receive warp, however it is then no longer in 2D screen space, so makes your job of aligning to viewports a bit more involved. Just something to bare in mind.

[Image Removed]

[Attachment Removed]

Thanks! Your suggestion worked great!

[Attachment Removed]