Hi Everyone
I’m having a problem with nDisplay
I had set 2 viewport in config file, and I like to show the UMG on one viewport, But somehow, the UMG will show on every single viewport that I set in config file.
So my question is How to show(or hiede) the UMG on the specific screen(viewport)?
Hi s2233125!
I just figured out how! I have 4 displays and was able to add 2 different UMG widgets each to a different viewport. I’ve attached a screenshot of the function. I used the “Displaycluster Module API” node to “Get local viewports” and “Get viewport rectangle” in order to scale all the viewports i did not want the widget to display. I hid the widgets by scaling their “Viewport Size” to 0.
Inside the Function:
- First check if the widget exists (isValid) and if not create the widget.
- Get all N Display viewport IDs and for each check their IDs to match the ID you wish to assign that specific widget. If it doesn’t match, set the scale to 0.
- On completion of the loop, add to viewport.
At Begin Play (or wherever you need it):
I duplicated the above function for every unique widget (and changed widget + variables inside) then entered the Viewport ID that I wanted for each widget.
Note: I got some memory errors when testing, so this may be memory intensive. But it works.
3 Likes