Search Unity

Download percentage only produces 0 or 1 (V 1.2.4)

Discussion in 'Addressables' started by KrikeyAdmin, Oct 2, 2019.

  1. KrikeyAdmin

    KrikeyAdmin

    Joined:
    Feb 5, 2018
    Posts:
    29
    I'm having an issue when using
    Code (CSharp):
    1. Addressables.DownloadDependenciesAsync
    with it only returning either 0 or 1 for the download percentage.


    Code (CSharp):
    1.  
    2. void Start() {
    3.     var downloadHandle = Addressables.DownloadDependenciesAsync(addressableLabel);
    4.     StartCoroutine(GetDownloadProgress(downloadHandle));
    5. }
    6.  
    7. IEnumerator GetDownloadProgress(AsyncOperationHandle handle)
    8. {
    9.     do
    10.     {
    11.         Debug.Log((handle.PercentComplete * 100f) + "%");
    12.         yield return new WaitForSeconds(0.1f);
    13.      } while (!handle.IsDone);
    14. }
    Screen Shot 2019-10-02 at 10.17.34 AM.png

    Any ideas if I'm doing something wrong, or if this is a possible bug with the Addressables package (1.2.4)?
     
    unity_SNfu4UkqyFqO7g likes this.
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    What exactly is your setup...
    - real hosted server, or editor hosting?
    - play mode or built player?
    - one big bundle or many small ones?