Okay, so I upgrade my old 4.6 Unity project into Unity 5.0. Overall, the process was relatively painless, but now my Quit button doesn't work when I build for Android.
And I get a very odd message via logcat:
E/Unity (23691): RenderTexture warning: Destroying active render texture. Switching to main context.
E/Unity (23691):
E/Unity (23691): (Filename: Line: 295)
E/Unity (23691):
My quit code in my GameController script is pretty simple:
public void Quit () {
Application.Quit();
}
void OnApplicationQuit () {
if (showAds) { //just in case
adController.DestroyAll();
}
}
What should I be looking for? Is it a texture issue? I do have a custom shader, but the game worked fine with Unity 4.6 before.
So, it all went back to Unity5 and how it integrates older plugins like Admob. Apparently, there is no ProxyActivity needed anymore for Android builds. So I completely removed the following out of the AndroidManifest.xml file:
And then moved the
<intent-filter>into the UnityPlayerActivity:Now Application.Quit() works no problem!
Complete AndroidManifest.xml: