The documentation for RenderTextures states that:
“Keep in mind that render texture contents can become “lost” on certain events, like loading a new level, system going to a screensaver mode, in and out of fullscreen and so on. When that happens, your existing render textures will become “not yet created” again”
I use RenderTextures whose contents need to persist for gameplay purposes. Yet the above makes me worried. Is there any way to ensure a RenderTexture is not lost/reset?
Thanks!
Personally, I didn’t run into this (maybe it only happens on certain platforms?) but you could copy the texture contents into a regular texture. Might also be a bit more efficient for textures that are only rendered once because the texels of regular textures are arranged in a more efficient order (e.g. Morton order).
Maybe this is referring to the Device Lost problem but this isn’t a thing anymore since DX10 (only when you do crazy stuff like physically removing the GPU or updating the driver while playing).
1 Like