Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unity addressables very slow on android device?

Discussion in 'Addressables' started by unity_SHTkdfNIaNCfqQ, Feb 26, 2020.

?

Unity addressables very slow on android device?

  1. addressables

    1 vote(s)
    50.0%
  2. addressables

    1 vote(s)
    50.0%
  1. unity_SHTkdfNIaNCfqQ

    unity_SHTkdfNIaNCfqQ

    Joined:
    Jan 5, 2020
    Posts:
    5
    Hi, I use Unity 2019.2.21f1 addressables v1.6.2

    I load about 20 prefabs what use about 15 textures 2048 * 2048 like this

    async void Start()
    {
    List<Task> tasks = new List<Task>();

    foreach (string prefab in eLocationPrefab.GetNames(typeof(eLocationPrefab)))
    {
    var op = InstantiateLocationPrefab((eLocationPrefab)Enum.Parse(typeof(eLocationPrefab), prefab));
    tasks.Add(op);
    }

    await Task.WhenAll(tasks.ToArray());

    // -- Comleted ---//
    }


    internal static async Task<GameObject> InstantiateLocationPrefab(eLocationPrefab prefab)
    {
    AsyncOperationHandle<GameObject> op = Addressables.InstantiateAsync("{0}.prefab".FormatWith(prefab.ToString()));
    await op.Task;

    return op.Result;
    }

    Settings addressables in attach

    In editor all this load fast about 2 sec

    On andoid device like Samsung Galaxy S7 this operation about 15 sec. If you do not use addressables and put all the prefabs on the scene, then the scene is loaded about 3 sec on android device.

    Has anyone encountered such a problem and why is it so slow on android?
     

    Attached Files:

  2. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    459
    Try disabling CRCs. That was my issue in WebGL, could be the same on Android.
     
  3. unity_SHTkdfNIaNCfqQ

    unity_SHTkdfNIaNCfqQ

    Joined:
    Jan 5, 2020
    Posts:
    5
    Thank you ProtoTerminator. Yes its more faster now abot 6 sec, but still still not fast. On editor its 3 sec

    What more can be done?
     

    Attached Files:

  4. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    459
    I don't know what else can be done. Did you test it with regular assetbundles?
     
  5. unity_SHTkdfNIaNCfqQ

    unity_SHTkdfNIaNCfqQ

    Joined:
    Jan 5, 2020
    Posts:
    5
    Yes, with regular assetbundles. I disable Use Asset Budle Cache and now 5.6 sec on Samsung Galaxy S7. On slower devices, the situation is generally deplorable.

    Can someone from the unity developers comment on the problem?
     
  6. wirelessdreamer

    wirelessdreamer

    Joined:
    Apr 13, 2016
    Posts:
    128
    I've been seeing similar issues, building for quest, when loading larger assets with addressables, builds crash when loading assets
    Logcat output:
    W ActivityManager: Activity pause timeout for ActivityRecord
    W Unity : Timeout while trying to pause the Unity Engine.
     
unityunity