Log in or register to post comments

Unity AR app freezes when app resumes

March 27, 2012 - 4:02pm #1

I'm building an android Unity AR app for the Sony Tablet S. I'm basing everything off of the demo project on the unity assets store(before the vuforia update). What happens is whenever the lock button is pressed the camera is frozen on the last rendered frame when the app is resumed. This is the case for the demo scene provided.Only way around is to close the app out and restart. Can this method below somehow be edited to fix this problem? Any help would be greatly appreciated.

// Stops QCAR when the application is sent to the background.
void OnApplicationPause(bool pause)
{

if (pause)
{
StopQCAR();
GL.Clear(false, true, new Color(0.0f, 0.0f, 0.0f, 1.0f));
}
else
{
StartQCAR();
// Clear any artifacts from the buffers on resume
mClearBuffers = 8;
}
}

thanks,
-T

Re: Unity AR app freezes when app resumes

March 27, 2012 - 9:26pm #5

Try updating to 3.5 final, perhaps this was a bug in the beta.

- Kim

Re: Unity AR app freezes when app resumes

March 27, 2012 - 9:15pm #4

I'm on version 3.5.0b6

Re: Unity AR app freezes when app resumes

March 27, 2012 - 8:55pm #3

What version of Unity are you using? This sounds like a Unity bug if the application is paused when the screen is locked but not resumed on unlock.

- Kim

Re: Unity AR app freezes when app resumes

March 27, 2012 - 4:55pm #2

Update:

1.When the lock screen button is pressed OnApplicationPause(True) is called.

2.Then if returning from the unlock screen OnApplicationPause(False) never happens. The application remains paused.

The application works fine if you are just toggling back and forth with the home screen. I'm hoping someone else has seen/fixed this problem

Log in or register to post comments