Search Unity

[0.8.6] AsyncOperationHandle.PercentComplete does not work properly with LoadSceneAsync

Discussion in 'Addressables' started by k7a_5, Jun 20, 2019.

  1. k7a_5

    k7a_5

    Joined:
    Mar 6, 2019
    Posts:
    1
    I use AAS 0.8.6 on Unity 2018.3.9f1.

    AsyncOperationHandle.PercentComplete does not work properly with LoadSceneAsync.
    (At LoadAssetAsync, it works properly)

    For example:

    Code (CSharp):
    1.  
    2. using UnityEngine.AddressableAssets;
    3. using UnityEngine.ResourceManagement.AsyncOperations;
    4. using UnityEngine.ResourceManagement.ResourceProviders;
    5. public class SceneProgressTest : MonoBehaviour
    6. {
    7.     AsyncOperationHandle<SceneInstance> op;
    8.     public string sceneAddress;
    9.  
    10.     async void Start()
    11.     {
    12.         op = Addressables.LoadSceneAsync(sceneAddress);
    13.     }
    14.  
    15.     void Update()
    16.     {
    17.         if (op.IsValid())
    18.         {
    19.             // expected to output progress, but only "0.00" was displayed
    20.             Debug.Log($"{op.PercentComplete:0.00}");
    21.         }
    22.     }
    23. }
    24.  
    It is considered to be caused by the fact that SceneProvider.SceneOp has no implementation of Progress.
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Thanks. we have a fix coming that will show what data we have.