Search Unity

LoadAssetAsync How to speed up loading FBX models

Discussion in 'Addressables' started by Chenfrank, Feb 6, 2020.

  1. Chenfrank

    Chenfrank

    Joined:
    Mar 25, 2015
    Posts:
    14
    I found that it takes a long time to load using LoadAssetAsync. Is there any way to make the loading faster?

    example:

    var getFbx = Addressables.LoadAssetAsync<GameObject>(key);
    await getFbx.Task;
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You can always not wait, and go off and do other things while it loads in the background.
     
  3. Chenfrank

    Chenfrank

    Joined:
    Mar 25, 2015
    Posts:
    14
    Excuse me, are there any examples?
     
  4. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    586
    @Jaimi He's already doing that, that's what the
    await
    keyword does.

    @Chenfrank You can make your assets smaller. Enable model optimization and animation compression. You should also check to make sure the single asset you're trying to load is not packed with other assets. In the group settings, under advanced, set the
    Bundle Mode
    to
    Pack Separately
    .

    [Edit] You should also disable CRC in the group settings. Not sure why that's enabled by default when the network layer has CRCs built in, but that will definitely kill your loads on slower machines.
     
    Last edited: Feb 7, 2020
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Well, maybe and maybe not. If the rest of his code that is executing is after the await, he is waiting - not processing something else.
     
  6. frank231love

    frank231love

    Joined:
    Jun 2, 2019
    Posts:
    23