How to capture camera images and save them locally

This method is also used to only make a small map. To display the screen captured by the camera to the ui,
insert image description here
it is now necessary to save the camera screen to the local

First of all, in order to achieve controllability. First create a new actor, then add a camera, and bind a SceneCaptureComponent2D component under the camera.
insert image description here
Similarly, to change the Render'Target and screenshot mode under this component,
insert image description here
you need to adjust the rendertarget settings. The encoding format is very important, and it must be adjusted correctly. Use
insert image description here
the method of saving the rendertarget that comes with the engine to save the picture.
insert image description here
Save it successfully to see the effect
insert image description here

Guess you like

Origin blog.csdn.net/tianxiaojie_blog/article/details/106108264