Multithreaded rendering on Galaxy Note 4 (Android 5.0.1) fails
I'm loading my game scene from the start menu scene asynchronously:
IEnumerator LoadLevelAsync(string sceneName)
{
var asyncOp = Application.LoadLevelAsync(sceneName);
while(!asyncOp.isDone)
{
loadProgressImage.fillAmount = asyncOp.progress;
yield return null;
}
loadProgressImage.fillAmount = 1f;
yield return null;
}
//It gets called from another couroutine as follows:
Debug.Log("Going to start loading level");
yield return StartCoroutine( LoadLevelAsync(levelToLoad));
Debug.Log("Finished loading level");
The level loads on all devices, but on the Galaxy Note 4, the coroutine never finishes. I think the asyncOp.isDone never gets set to true even though the scene is loaded in the background (the game starts and I can hear my character running and picking up stuff). This works on other Android devices and iOS.
Maybe it has nothing to do with LoadAsync - maybe there's an error with the scene that I'm loading. Any ideas on how to get a crash log from a remote device (user is in another country).
When I turn off multithreaded rendering, the level loads on the Note 4, but all other devices run at a much slower FPS.
Has anyone else run into this problem?
Answer by psykojello2 · Jan 26, 2016 at 06:48 PM
I was finally able to physically connect to a friends Note 4 and run builds from Unity and it helped me debug the problem.
In the new scene being loaded, I had 2 cameras. One was in screen space and one was in world space. I think the Galaxy Note 4 and possibly other android devices could not support 2 cameras multi threaded?
I got it to work with a single camera and it runs on Note 4 now.
Bottom line : 2 cameras and multi threaded rendering might not work out well.