- Home /
Keeping render textures after ctrl-alt-delete
We're using a render texture to store some image data in (it's a texture that gets other decals drawn on it sometimes multiple times every frame, and we want to keep the combined result) but obviously render textures get nuked when the game loses focus.
OnApplicationFocus() seems to work for people alt-tabbing - when it loses focus I can take the rendertexture out to a buffer texture and when it re-focuses I can blit the buffer texture back into the render texture. All working fine (with some catches for people alt-tabbing multiple times in quick succession)
However on windows 8 (possibly on other windows versions) in windows standalone build (not store) ctrl-alt-delete will sometimes destroy the render textures before calling OnApplicationFocus(), and the render textures in the OnApplicationFocus will return "true" for IsCreated() but be blank/invalid.
Has anyone else experience this? any way to work around it? Is there a better way to store these images?
Any chance a solution was found for this? I am doing something similar to you, saving out the RT then back in when focus returns, but it is a little unreliable. Looking for a better solution
Your answer

Follow this Question
Related Questions
unity 3 Render Texture limitations on IOS (cant set bigger then 512 - bug?) 2 Answers
Problem using RenderTexture 1 Answer
Vuforia QCAR : RenderTexture are black 0 Answers
Vectrosity: SetCamera(), aspect, resolution and rendertextures 1 Answer
RenderTexture with RenderTextureFormat.DefaultHDR doesn't work 0 Answers