Toggling UMG UIs for screenshots

If you use “highresShot” or “highresShot 2” in console command, the UMG UI will not be saved! Only the scene render gets saved… Otherwise, within your UMG Widget Blueprint EventGraph, add a CustomEvent by right clicking and typing “Custom Event”, naming it “ToggleMyMenu”. Let’s assume you have 5 images in your UMG, R1 thru R5… See the image attached, you can first get visibility on R1: 2 is Hidden and 0 is visible… then you can set the visibility on UMG:

Now in your Level Blueprint or class blueprint where you create and display the UMG, you need to cast the CustomEvent ToggleMyMenu and tie it to an event like the Key T. see the image attached:

Now, you can toggle the UMG off and on using Key T.