I try load assetbundle scene from http server, but if file size more then 10 Mb, device screen freeze and application crush is out of memory.
Log
11-21 11:09:05.233 19479 19500 W ingKIOUTContro: 0xebadde09 skipped times: 0
11-21 11:09:05.233 19479 19500 E CRASH : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
11-21 11:09:05.233 19479 19500 E CRASH : ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
11-21 11:09:05.233 19479 19500 E CRASH : Build type ‘Development’, Scripting Backend ‘mono’, CPU ‘armeabi-v7a’
11-21 11:09:05.233 19479 19500 E CRASH : Build fingerprint: ‘samsung/a50xser/a50:9/PPR1.180610.011/A505FNPUS2ASJ1:user/release-keys’
11-21 11:09:05.233 19479 19500 E CRASH : Revision: ‘7’
11-21 11:09:05.233 19479 19500 E CRASH : pid: 19479, tid: 19500, name: UnityMain >>> com.games.trainingKIOUTControl <<<
11-21 11:09:05.233 19479 19500 E CRASH : r0 b2c45010 r1 0000003d r2 1187a034 r3 80000000
11-21 11:09:05.233 19479 19500 E CRASH : r4 b2c45010 r5 00000000 r6 0000003d r7 00000000
11-21 11:09:05.233 19479 19500 E CRASH : r8 c93759c8 r9 c35fc110 sl 00000000 fp b20ba650
11-21 11:09:05.233 19479 19500 E CRASH : ip cae44ccc sp c93759a8 lr c9f40ac4 pc c9f40ac4 cpsr 00004c2c
11-21 11:09:05.233 19479 19500 E CRASH :
11-21 11:09:05.233 19479 19500 E CRASH : backtrace:
Enumerator DownloadAsset(string url,Hash128 hash)
{
using (UnityWebRequest uwr = UnityWebRequestAssetBundle.GetAssetBundle(url, hash, 0))
{
uwr.SetRequestHeader("token", token);
uwr.SetRequestHeader("isManifest", "false");
var operation = uwr.SendWebRequest();
while (!operation.isDone)
{
MainText.text = (uwr.downloadProgress * 100).ToString();
yield return null;
}
AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(uwr);
{
print("Get asset from bundle...");
}
uwr.Dispose();
print("ready to Load scene from asset...");
StartCoroutine(LoadSceneTrue(bundle));
}
}
IEnumerator LoadSceneTrue(AssetBundle bundle)
{
yield return null;
string[] scenePath = bundle.GetAllScenePaths();
AsyncOperation asyncOperation = SceneManager.LoadSceneAsync(scenePath[0]);
asyncOperation.allowSceneActivation = false;
Debug.Log("Pro :" + asyncOperation.progress);
while (!asyncOperation.isDone)
{
MainText.text = "Loading progress: " + (asyncOperation.progress * 100) + "%";
if (asyncOperation.progress >= 0.9f)
{
asyncOperation.allowSceneActivation = true;
}
yield return null;
}
bundle.Unload(false);
}