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

404 error occured after network connection failed

Discussion in 'Addressables' started by thevoid_ky, Jun 23, 2021.

  1. thevoid_ky

    thevoid_ky

    Joined:
    Mar 18, 2018
    Posts:
    4
    Represent:
    1. Turn off wi-fi and data on a phone
    2. Run app and try "Addressables.LoadAssetAsync<{T}>("{address of my any asset}")"
    3. Error occured because of its network out
    4. Turn on the network
    5. Retry that "Addressables.LoadAssetAsync" (NOT relaunch app, just do retry on code)
    6. 404 error occured

    This error has not occured as the network was activated before launching the app.
     
  2. thevoid_ky

    thevoid_ky

    Joined:
    Mar 18, 2018
    Posts:
    4
    I resolved it for now,

    Code (CSharp):
    1. try
    2. {
    3.     await Addressables.InitializeAsync();
    4.     await Addressables.UpdateCatalogs();
    5. }
    6. catch
    7. {
    8.     SceneManager.LoadSceneAsync(FirstScene);
    9.     return;
    10. }
    but I don't know how to retry without to reload scene yet