# Savegame Menu With Screenshot Thumbnails

**URL:** <https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541>\
**Category:** UI\
**Tags:** unreal-engine, Widget, UMG\
**Created:** [May 23, 2016, 1:21pm UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541 "2016-05-23T13:21:00Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seirei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Seirei](https://forums.unrealengine.com/u/Seirei)\
**Post date:** [May 23, 2016, 1:21pm UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/1 "2016-05-23T13:21:00Z")

</div>

Hello everyone!

So for a while now I’ve been wondering how to create something like this. It seems like such a simple tast that is used in a lot of games, but so far I couldn’t really find a tutorial on it.  
I currently have a project that uses a savegame to save certain variables. So far it only uses one, but I’d like to be able to save up multiple states and have a little thumbnail of the current camera for it aswell.  
So what would be the quickest way to add that functionality to an existing savegame system?

tl;dr  
How do I save a screenshot of the current scene and use it as a thumbnail for the save states in my HUD?

---

<div class="post-metadata">

**Author:** ![hippowombat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hippowombat/32/906590_2.png) [@hippowombat](https://forums.unrealengine.com/u/hippowombat)\
**Post date:** [May 24, 2016, 3:52am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/2 "2016-05-24T03:52:34Z")

</div>

> [@Seirei;534698](#):
>
> Hello everyone!
> 
> So for a while now I’ve been wondering how to create something like this. It seems like such a simple tast that is used in a lot of games, but so far I couldn’t really find a tutorial on it.  
> I currently have a project that uses a savegame to save certain variables. So far it only uses one, but I’d like to be able to save up multiple states and have a little thumbnail of the current camera for it aswell.  
> So what would be the quickest way to add that functionality to an existing savegame system?
> 
> tl;dr  
> How do I save a screenshot of the current scene and use it as a thumbnail for the save states in my HUD?

I’m not familiar with creating save games, though there are plenty of tutorials for that, but you could probably add scene capture 2d component (have it attached to your camera and give it the same transform so that it captures from the same view as your in game camera) in your character blueprint, and each time you save, have it update the capture, and input that capture in an instanced material that’s assigned to a menu widget image piece.

---

<div class="post-metadata">

**Author:** ![Seirei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Seirei](https://forums.unrealengine.com/u/Seirei)\
**Post date:** [May 24, 2016, 8:25am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/3 "2016-05-24T08:25:16Z")

</div>

Hi hippowombat,

I thought about doing something like that, but so far I wasn’t sure if the texture from the scene capture would actually be saved. I noticed that a scene capture 2d loses it’s texture on restart. At least back in 4.8 I had that happening. Guess I’ll just have to try it out then.

---

<div class="post-metadata">

**Author:** ![Zarkopafilis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zarkopafilis](https://forums.unrealengine.com/u/Zarkopafilis)\
**Post date:** [May 24, 2016, 9:16am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/4 "2016-05-24T09:16:24Z")

</div>

Scene capture -\> Texture2D -\> save to savegame

---

<div class="post-metadata">

**Author:** ![Seirei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Seirei](https://forums.unrealengine.com/u/Seirei)\
**Post date:** [May 24, 2016, 1:55pm UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/5 "2016-05-24T13:55:22Z")

</div>

Will do! Thanks!

---

<div class="post-metadata">

**Author:** ![xiaoxiaocg78](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xiaoxiaocg78](https://forums.unrealengine.com/u/xiaoxiaocg78)\
**Post date:** [May 9, 2017, 10:32am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/6 "2017-05-09T10:32:42Z")

</div>

Hello.  
Did you finish this function? I also need to do a similar function, can share the experience? Thanks…

---

<div class="post-metadata">

**Author:** ![Seirei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Seirei](https://forums.unrealengine.com/u/Seirei)\
**Post date:** [May 10, 2017, 10:37am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/7 "2017-05-10T10:37:34Z")

</div>

Sadly it didn’t work as expected and we ended up using C++ to save and load the images directly to the HDD.

---

<div class="post-metadata">

**Author:** ![NazeerSany](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nazeersany/32/632602_2.png) [@NazeerSany](https://forums.unrealengine.com/u/NazeerSany)\
**Post date:** [August 4, 2017, 7:43am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/8 "2017-08-04T07:43:49Z")

</div>

Can you plz share how to save and load images using c++? Thanks !

---

<div class="post-metadata">

**Author:** ![JohnADaniels](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/johnadaniels/32/1080686_2.png) [@JohnADaniels](https://forums.unrealengine.com/u/JohnADaniels)\
**Post date:** [January 4, 2018, 3:15am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/9 "2018-01-04T03:15:59Z")

</div>

i know this is old, but I am trying to do the same thing, does anyone know of a solution?

---

<div class="post-metadata">

**Author:** ![nick\_absent](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nick_absent/32/632584_2.png) [@nick\_absent](https://forums.unrealengine.com/u/nick_absent)\
**Post date:** [August 30, 2018, 2:22pm UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/10 "2018-08-30T14:22:14Z")

</div>

**JohnADaniels**. see [my post](https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/113891-taking-screenshot-for-save-slot-thumbnail), if you are still interesting in it.

---

<div class="post-metadata">

**Author:** ![KelbyVP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kelbyvp/32/261024_2.png) [@KelbyVP](https://forums.unrealengine.com/u/KelbyVP)\
**Post date:** [November 27, 2019, 6:25am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/11 "2019-11-27T06:25:19Z")

</div>

Here’s how I do it with a custom event in my spectator pawn (you would use whatever player pawn you use). My Game Instance calls this event, and this saves the screenshot with whatever file name I designate. My Save Game has a string variable that contains this file name, and my load game widget gets that screenshot file name and imports the screenshot file as a Texture 2D.

---

<div class="post-metadata">

**Author:** ![crossmr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crossmr](https://forums.unrealengine.com/u/crossmr)\
**Post date:** [February 10, 2020, 1:30am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/12 "2020-02-10T01:30:31Z")

</div>

> [@KelbyVP](#):
>
> Here’s how I do it with a custom event in my spectator pawn (you would use whatever player pawn you use). My Game Instance calls this event, and this saves the screenshot with whatever file name I designate. My Save Game has a string variable that contains this file name, and my load game widget gets that screenshot file name and imports the screenshot file as a Texture 2D.

What node do you use to import the screen as a texture 2D?

---

<div class="post-metadata">

**Author:** ![KelbyVP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kelbyvp/32/261024_2.png) [@KelbyVP](https://forums.unrealengine.com/u/KelbyVP)\
**Post date:** [February 10, 2020, 1:29pm UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/13 "2020-02-10T13:29:43Z")

</div>

My C++ code is below for importing the save file as a Texture2D. (Fair warning, I changed the way I save these screenshots pretty dramatically; I’ll post that separately.) My apologies in advance that I can’t seem to figure out how to post code correctly:

FString USaveGametFunctionLibrary::GetSaveGameScreenshotName(const FString& SaveGameName)  
{  
return FPaths::ProjectSavedDir() + TEXT(“SaveGames/”) + SaveGameName + TEXT(".png");  
}

UTexture2D\* USaveGametFunctionLibrary::ImportScreenshotSave(UObject\* WorldContextObject, const FString& SaveGameName)  
{  
FString ScreenshotFile = GetSaveGameScreenshotName(SaveGameName);

if (FPaths::FileExists(ScreenshotFile))  
{  
return FImageUtils::ImportFileAsTexture2D(ScreenshotFile);  
}

return nullptr;  
}

---

<div class="post-metadata">

**Author:** ![KelbyVP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kelbyvp/32/261024_2.png) [@KelbyVP](https://forums.unrealengine.com/u/KelbyVP)\
**Post date:** [February 10, 2020, 1:32pm UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/14 "2020-02-10T13:32:10Z")

</div>

Here’s my new approach to saving the screenshots. First, the blueprint:

 ![ScreenshotSave.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/3/e3ddb3ee5f1a652d5dee841a79184783f700a891.png)  
Next, the C++ SaveScreenshot function:

bool USaveGametFunctionLibrary::SaveScreenshot(  
class USceneCaptureComponent2D\* Target,  
const FLinearColor ClearColour,  
const FString SaveGameName)  
{  
if ((Target == nullptr) || (Target-\>TextureTarget == nullptr))  
{  
return false;  
}

FRenderTarget\* RenderTarget = Target-\>TextureTarget-\>GameThread\_GetRenderTargetResource();  
if (RenderTarget == nullptr)  
{  
return false;  
}

TArray\<FColor\> RawPixels;

// Format not supported - use PF\_B8G8R8A8.  
if (Target-\>TextureTarget-\>GetFormat() != PF\_B8G8R8A8)  
{  
UE\_LOG(LogTemp, Warning, TEXT(“Format not supported - use PF\_B8G8R8A8.”));  
return false;  
}

if (!RenderTarget-\>ReadPixels(RawPixels))  
{  
return false;  
}

// Convert to FColor.  
FColor ClearFColour = ClearColour.ToFColor(false); // FIXME - want sRGB or not?

for (auto& Pixel : RawPixels)  
{  
// Switch Red/Blue changes.  
const uint8 PR = Pixel.R;  
const uint8 PB = Pixel.B;  
Pixel.R = PB;  
Pixel.B = PR;

// Set alpha based on RGB values of ClearColour.  
Pixel.A = ((Pixel.R == ClearFColour.R) && (Pixel.G == ClearFColour.G) && (Pixel.B == ClearFColour.B)) ? 0 : 255;  
}

IImageWrapperModule& ImageWrapperModule = FModuleManager::LoadModuleChecked\<IImageWrapperModule\>(FName(“ImageWrapper”));  
TSharedPtr\<IImageWrapper\> ImageWrapper = ImageWrapperModule.CreateImageWrapper(EImageFormat::PNG);

const int32 Width = Target-\>TextureTarget-\>SizeX;  
const int32 Height = Target-\>TextureTarget-\>SizeY;

if (ImageWrapper.IsValid() && ImageWrapper-\>SetRaw(&RawPixels[0], RawPixels.Num() \* sizeof(FColor), Width, Height, ERGBFormat::RGBA, 8))  
{  
FFileHelper::SaveArrayToFile(ImageWrapper-\>GetCompressed(), \*GetSaveGameScreenshotName(SaveGameName));  
return true;  
}

return false;  
}

---

<div class="post-metadata">

**Author:** ![ganbaa\_elmer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ganbaa_elmer/32/476547_2.png) [@ganbaa\_elmer](https://forums.unrealengine.com/u/ganbaa_elmer)\
**Post date:** [May 26, 2022, 2:29am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/15 "2022-05-26T02:29:15Z")

</div>

@nick_absent @hippowombat @KelbyVP @NazeerSany @crossmr @JohnADaniels How to take selfie on unreal Mobile game?

---

<div class="post-metadata">

**Author:** ![SVasilev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SVasilev](https://forums.unrealengine.com/u/SVasilev)\
**Post date:** [June 20, 2022, 9:07am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/16 "2022-06-20T09:07:51Z")

</div>

Hey there! I’ve tried spawning SceneCapture2D and then rendering the scene capture to a render target. I was not able to save the resulting Texture2D to a SaveGame file directly (was resulting in a black image) but I was able to save the Texture2D to an actual file on the HDD. I know using C++, this is a rather easy task but I’ve managed to do it in Blueprints only since there were a lot of people interested.

Save binary thumbnail image to &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HDD: [Save slot thumbnail image posted by anonymous | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/m4oczzq5/)  
Load binary thumbnail image from HDD: [Load slot thumbnail image posted by anonymous | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/nyb11h7o/)

This is tested on Windows with UE 4.27. I would be happy if someone confirms it works on other platforms as well. Cheers!

---

<div class="post-metadata">

**Author:** ![RealmDelight](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/realmdelight/32/778036_2.png) [@RealmDelight](https://forums.unrealengine.com/u/RealmDelight)\
**Post date:** [December 18, 2023, 2:21am UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/17 "2023-12-18T02:21:27Z")

</div>

This plugin perfectly solves this problem about thumbnail of Texture2D：  
[Screenshot as Texture2D in Code Plugins - UE Marketplace (unrealengine.com)](https://www.unrealengine.com/marketplace/en-US/product/high-performance-screenshot-as-texture2d)

---

<div class="post-metadata">

**Author:** ![AlexN2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlexN2](https://forums.unrealengine.com/u/AlexN2)\
**Post date:** [May 1, 2024, 9:59pm UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/18 "2024-05-01T21:59:16Z")

</div>

Here is my solution. I use make screenshot high resolution. I save in project / images directory with 111.png name.

 ![2024-05-02_00-53-50](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/2/7523a15bb5a78e481cbd1735ce5c117338235d0e.png)  
In widget I made ContinueImage which is simple image component and importing image as texture.  
 ![2024-05-02_00-55-35](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/b/b/dbbe3321d47dc85e8921be7f2b0b8b02dc561ee7.png)

May be it will be usefull.

---

<div class="post-metadata">

**Author:** ![spereku](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/spereku/32/1204610_2.png) [@spereku](https://forums.unrealengine.com/u/spereku)\
**Post date:** [February 1, 2025, 11:52pm UTC](https://forums.unrealengine.com/t/savegame-menu-with-screenshot-thumbnails/64541/19 "2025-02-01T23:52:33Z")

</div>

Hi! You can use a free plugin for this:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/c/7/dc72d011fc64a8d3ed41cc9123a8ee8bc79b76f5.jpeg "Unreal engine tutorial - How to create save game thumbnails using blueprints") ](https://www.youtube.com/watch?v=58c_1kdZQtE)
