Issues Pausing My App
When I try to pause my game, either by losing focus on the app or calling Application.Quit(), my app pauses/closes but behaves strangely and logs certain warnings/errors.
This is logged occasionally:
E/Unity: Error trying to call delegated method pause. null
This is logged every time:
W/ActivityManager: Activity pause timeout for ActivityRecord{MY ACTIVITY INFO HERE}
W/PackageManager: Failure retrieving resources for com.example.unitytest: Resource ID #0x0
W/Unity: Timeout while trying to pause the Unity Engine.
In addition, my onApplicationPause()/onApplicationQuit() functions are never called on my GameObjects (which are always active and solely contain Debug.Log statements). Any ideas for why this may be happening?
Answer by dustinkerstein · Aug 22, 2017 at 05:55 PM
I can also replicate these errors, but I don't seem to be having any issues with getting my onApplicationPause() code to run.
These errors only seem to happen if VR Supported == True.
If I have a VR app, wouldn't it be necessary for me to have that boolean set to True? (Sorry, I neglected to mention that aspect of my app).
Yes, that bool is required to be set True if you're using VR. I just wanted to clarify that this error only happens when it's set True.
I'm having the exact same problem. After changing phones to an S8 can't build for the Google Cardboard and get those same errors in the log.
Where you able to find a solution?
I don't believe we're having the same issues as I am able to build my app with no errors. This is a runtime issue for me.
@dustinkerstein - did you ever get to the bottom of this? We are having similar runtime issues with daydream.
@sosh - As it didn't seem to cause any direct issues for me, I just ended up ignoring it. I'm actually not sure if it even happens on the latest Unity build on my app. I'll test it when I get a chance this week.
Thanks. It's happening in latest beta Unity for me. I've got associated problems, but I'm not 100% sure they are caused by this.
Your answer
Follow this Question
Related Questions
Enable/disable is not working as expected 2 Answers
Pausing Play on Android 0 Answers
Pause menu Change 0 Answers
NPC still moves even when paused. 1 Answer