Search Unity

Addressable Asset System freezing on Android.

Discussion in 'Addressables' started by Deleted User, Oct 30, 2019.

  1. Deleted User

    Deleted User

    Guest

    In my project I need to load assets that are not in the scene during runtime. To do this, I put them in a folder called resources and load them asynchronously. Here I have no problems, everything goes very smoothly and quickly.

    Today I decided to try Addressable Asset System. I downloaded the Addressable Asset System package, and marked an Asset that is located in a Resources folder as addressable. Addressable Asset System automatically moves the Asset from the Resources folder to a new folder in my Project named Resources_moved.

    So after all this, I compiled my project and launched it on the phone. And now when I try load and instantiate those assets, the entire app freezes for about a second.

    This is how I load an asset:
    Code (CSharp):
    1. void LoadedAsset(string addressName){
    2. UnityEngine.AddressableAssets.Addressables.LoadAsset<GameObject>(addressName).Completed += LoadDone;
    3. }
    4. void LoadDone(UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation<GameObject> obj){
    5. _selfObject = obj.Result;
    6. }
     
  2. Deleted User

    Deleted User

    Guest