Game freezes loading a new scene with Android split application (APK + OBB)

Hi All,

Been banging my head on this issue for a while now.

I have got an Android application which loads large movie files from StreamingAssets, therefore I have to turn Split Application Binary on to store those in the .obb expansion file.

However, when I do this, changing to any scene (initial scene loads fine because it’s included in the .apk) causes the game to freeze. No errors are logged in the logcat, build log or development build log.

If I make that scene the first one, it loads fine, therefore there must be an issue with the .obb loading.

I double checked and the .obb is copied to the right location, even copied it myself, but to no luck.

Here’s a list of fixes I attempted after googling the problem:

  • Changed install location to “Internal only” and / or Write Permission to “External (SD Card)” (Double checked it was in the manifest too)
  • Moved scenes to the Resources folder
  • Using C# code only
  • Changed Application / Package Name
  • Tried different scenes

None of these fixes work.

Using Unity 5.6.1f1.

Thanks in advance for any reply!
L

1-) Import this package to your project,

2-) Create new C# script and add this lanes to your main scene (Firstly loading scene)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class obbLoader : MonoBehaviour {
	// Use this for initialization
	void Start () {
		if (PlayerPrefs.GetInt ("obbLoaded") == 0) {
			GooglePlayDownloader.FetchOBB();
			PlayerPrefs.SetInt ("obbLoaded", 1);
			PlayerPrefs.Save ();
			Application.LoadLevel ("MainMenu");
		} 
	}
}