Search Unity

GetDownloadSizeAsync not working with AssetReferences (anymore?)

Discussion in 'Addressables' started by Kujo87, Oct 31, 2020.

  1. Kujo87

    Kujo87

    Joined:
    Sep 16, 2013
    Posts:
    168
    Hi,

    I've had some code set up for a while that will check to see if an asset is local/cached by using the GetDownloadSizeAsync method. Into this I pass in an Asset Reference (in this case, is a scene) to then see if we already have it. It had been working fine while using v1.8 of addressables, but since updating to 1.16, it now says I have a missing key every time, and throws an exception.

    I've re-tested it in v1.8 and it still works that way, but I can't find anything to suggest things have changed in how to do this with an asset reference?
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
    Hmm..let me bounce this off the team for their thoughts.
     
  3. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    What play mode script are you using?
     
  4. Kujo87

    Kujo87

    Joined:
    Sep 16, 2013
    Posts:
    168
    Hi @DavidUnity3d

    I've tried it with Asset Database and with an Existing built asset for a Windows player (inside unity) - I get the missing key for both - but now when running on v1.8
     
  5. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
  6. Kujo87

    Kujo87

    Joined:
    Sep 16, 2013
    Posts:
    168
    submitted
     
  7. ywkhan101

    ywkhan101

    Joined:
    Nov 11, 2020
    Posts:
    1
  8. Kujo87

    Kujo87

    Joined:
    Sep 16, 2013
    Posts:
    168
    ok - I've updated to 1.16.10 and can confirm it now works in simulate groups, but still not in Use Asset Database
     
  9. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
    Awesome! Thanks for that update, @Kujo87 ! The team is aware of an issue with GetDownloadSizeAsyc so they are taking a look.