Search code examples
screenshotgame-engineunreal-engine4

Unreal Engine 4 In-game Screenshot


Is there a way to take a screenshot in UE4 while in-game and save it somewhere so that I can use it again as an image or something?

There is a HighResShot solution, but that saves it somewhere outside the range of the editor (you cannot reach it programmatically), is there another way of doing it, that allows me to access it in-game?


Solution

  • I would recommend using HighResShot for taking the screenshots. As you mention, it saves this outside the range of the engine, in the "saved" folder. (In packaged builds, the saved content is in the user's appdata.) You can actually get this with ProjectSavedDir(), which returns this saved directory. https://docs.unrealengine.com/en-US/API/Runtime/Core/Misc/FPaths/index.html

    It's C++, but you can expose this to Blueprints fairly easily. You can get the ProjectSavedDir()/Screenshots directory and load the images in-game. For doing this, I recommend the Ramas plugin (https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/4014-39-rama-s-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required?3851-(39)-Rama-s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required=)