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.
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.