Hi there, i wonder how can i take a screenshot and save them directly in a gallery widget, instead of a folder. The idea is that the player will be able to take multiple pictures and download the ones them most like. Thanks!
Hello! You can have a scene capture component in your game and use it to capture screenshots and send the image to a saved Render Target. You can then access these targets you want to show in the widget.
However, you will still need to make as many render targets for the max amount of photos you would want to show up in the gallery.
To setup your scene capture, you will need to add the SceneCaptureComponent2D
to whatever actor you want to be taking the screenshots. Make sure to turn off Capture Every Frame
and Capture on Movement
to save on performance.
You can switch out which render target you want to save the screenshot to and then reference it later for displaying in your gallery widget.