Have a Unity 2019.2.6f1 hybrid app for android, for Google Cardboard or "magic window".
Unfortunately, I am a generic Unity dev and don't know much about debugging Android issues. Hoping to learn!
App starts, and user can select either VR mode or magic window mode. Either works as expected when navigating menus, &c. But to launch the game within the app, a prefab level (not a scene, just a container for meshes and colliders, &c.) is instantiated.
In VR mode, this is fine; app works as expected (also works fine in Unity editor). In "magic window" mode the app hangs. I fire up Android Studio and peek at logcat and see much I do not understand, but some lines that references the app:
W/ActivityManager: Activity pause timeout for ActivityRecord{47697f1 u0 [appname redacted]/com.unity3d.player.UnityPlayerActivity t14}
W/ziparchive: Unable to open '/data/app/[appname redacted]-tfHFV9otlMYpEHzeYzdHMw==/base.apk': No such file or directory
E/orola.launcher: Failed to open APK '/data/app/[appname redacted]-tfHFV9otlMYpEHzeYzdHMw==/base.apk' I/O error
E/ResourcesManager: failed to add asset path /data/app/[appname redacted]-tfHFV9otlMYpEHzeYzdHMw==/base.apk
W/PackageManager: Failure retrieving resources for [appname redacted]
[appname redacted] W/Unity: Timeout while trying to pause the Unity Engine.
[appname redacted] I/Unity: windowFocusChanged: false
[appname redacted] W/Unity: Timeout while trying detaching primary window.
[appname redacted] I/Choreographer: Skipped 241 frames! The application may be doing too much work on its main thread.
So my questions are:
Well, it turned out that this was only an issue on devices with 2gigs of RAM, and was ultimately resolved by on-the-fly adjusting the camera's FieldOfView to 30.0f (from 60.0f) for magic window. I'm not certain why this helped, but it was the answer we needed.