Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved Display progress of download

Discussion in 'Addressables' started by CoryMaklin, Oct 7, 2021.

  1. CoryMaklin

    CoryMaklin

    Joined:
    Oct 10, 2020
    Posts:
    29
    I'm using a remote catalog and I'm trying to display the progress of the download. However, it only returns 0. Is there something I'm missing?

    Code (CSharp):
    1. var handle = m_AssetReference.LoadSceneAsync(LoadSceneMode.Additive);
    2.         handle.Completed += OnCompleted;
    3.         while (!handle.IsDone)
    4.         {
    5.             var status = handle.GetDownloadStatus();
    6.             float progress = status.Percent;
    7.             progressUpdated?.Invoke(progress);
    8.             yield return null;
    9.         }
     
  2. CoryMaklin

    CoryMaklin

    Joined:
    Oct 10, 2020
    Posts:
    29
    After clearing my cache using yield return Addressables.ClearDependencyCacheAsync(m_AssetReference, false); it worked as expected.