cant save/load a Canvas Render Target 2d UE4.27

I have a basic expandable, scrolling, interactive minimap that suits my purposes, and I need it to progressively reveal the map as the player explores it.
I’ve been trying to implement a black mask with canvas render target (as a material instance), but I’m having problems getting the canvas render target to save/load properly. I get inconsistent behavior between editor/packaged builds which is making it difficult to figure out what’s happening

When I play it in the editor, the minimap works fine until the editor is restarted, all black mask data is lost. (turning the whole map black.)
When I build a release version and play it, it resets the canvas render target EVERY load screen.

As far as I can tell, nothing I’m doing is actually saving/loading the canvas render target.
I’m getting nothing from logs telling me about it either. :confused:

This is the minimap material (working component)

The widget applies the mask when it’s built

Load game: (probably not working)

Save game: (probably not working)

Draw to screen the player location (works well)

Surely there’s got to be someone out there experienced enough with Canvas Render Targets able to tell me what i’m doing wrong.

Or maybe is there some easier way to do this mask without canvas render targets?

I don’t want to have to make markers and switches that light up huge sections of the map if i can avoid it.

are canvas render targets just not meant to be loaded? Can’t I just draw to a texture 2d objects opacity channel? HELP

I started having some luck when I found export to png via export to disk. Import as 2d texture seems to work, and I managed to get a packaged build to import/export render targets using this method. My only problem is I’m now overmanaging the save data somewhere, so its starting a fresh render target on init, and then saving it.
So the app starts with a fresh render target every time it inits. I’ll mark this as solved tomorrow when I get more time to test it.

I used this tutorial:
UE4 Importing and Exporting Render Targets (Save and Load) using Blueprints - YouTube

1 Like