Hello!
I’m not sure if this is the right place to ask questions like this, but I figured it probably can’t hurt.
I’m working on debugging an issue with some android devices (i.e. Samsung Galaxy Nexus, SCH-15I5) causing render textures to have different textures after resuming the application from sleep.
Specifically, if I call RenderTexture.Release() on all of my rendertextures, I get the same result.
I’ve been lead to learn that android devices lose their openGL context after a pause/resume, and believe this is the cause of the issue.
I’ve been able to “fix” the issue by reloading the textures after resume, but only if I wait an arbitrary time after OnApplicationPause is fired. i.e.
IEnumerator OnApplicationPause(bool pause) {
yield return new WaitForSeconds(2.0f);
…loop through all rendertextures, release and reload
}
works, but yield return new WaitForEndOfFrame();
only sometimes works, not always.
Is there any way to know that Android has recreated it’s render context? How would I go about gating the reload? I don’t want to have the arbitrary wait. It feels odd.
}