Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Addressables.GetDownloadSizeAsync(???)

Discussion in 'Addressables' started by Fangh, Nov 9, 2020.

  1. Fangh

    Fangh

    Joined:
    Apr 19, 2013
    Posts:
    274
    Hello.
    Addressables.GetDownloadSizeAsync() take a "key" parameter. But what is the key of an addressable ?

    upload_2020-11-9_10-32-56.png
     
    AbgaryanFX likes this.
  2. fegabe

    fegabe

    Joined:
    Jan 3, 2015
    Posts:
    18
    It's the third one, named label in the addressable window. It should be too easy just call that parameter label right? :D
     
  3. Pe1man

    Pe1man

    Joined:
    Jan 10, 2016
    Posts:
    18
    It's actually every single thing you pointed out. Look at catalog.json, the m_Keys array;
     
  4. rabishan-maharjan

    rabishan-maharjan

    Joined:
    Jul 3, 2016
    Posts:
    18
    how do we call GetDownloadSizeAsync on addressables with more than 1 label?

    Edit: nevermind. found the answer. load the locations first using
    Code (CSharp):
    1. var locations = Addressables.LoadResourceLocationsAsync(keys, Addressables.MergeMode.Intersection)
    and then check download size using the locations.
     
    Last edited: Jan 23, 2021
    jignesh_n_patel and Raghavendra like this.
  5. AbgaryanFX

    AbgaryanFX

    Joined:
    Jan 9, 2010
    Posts:
    167