Search Unity

WebGL won't load assets after they have been cached.

Discussion in 'Addressables' started by DanVioletSagmiller, Aug 9, 2019.

  1. DanVioletSagmiller

    DanVioletSagmiller

    Joined:
    Aug 26, 2010
    Posts:
    114
    Versions: Unity. 2019.1.8f1, and Addressables 1.1.7, Built to WebGL, Chrome V76.0.3809.100 (latest)

    1) App Loads, No models/textures.

    2) Script in scene, on start(), starts an AssetRerence.LoadAssetAsync.
    - NOTE: there is a log message just before this request, verified it is called in all cases described below.

    3) The handler for Asset Loading Complete,
    - gets called, and the models are loaded.
    - but only the first time the page loads.
    - Everytime after that, The handler (which the first line in the handler, is a debug log call to report it) never gets called.

    I can get it to work if I run it in Incognito, and kill all instances before starting it again. but otherwise, once there is a cached copy, it never loads again. I have put messages on the other handlers as well, such as "CompletedTypeless" and "Destroyed", but those are never called either.

    Am I doing somethign wrong? Do I need to do something special with the build? Do I need to do something different for the download?

    - Thanks.
     
  2. chris_hellsten

    chris_hellsten

    Joined:
    May 5, 2014
    Posts:
    4
    Yeah I'm seeing the same behaviour in 2019.2.0f1 & Addressables 1.1.7. If I change the Addressables group settings to disable "Use Asset Bundle Cache" then the assets will load every time as expected. Otherwise, as OP describes, it only loads assets properly the first time.
     
  3. DanVioletSagmiller

    DanVioletSagmiller

    Joined:
    Aug 26, 2010
    Posts:
    114
    Thank you for the tip. I was assuming by turning off caching, that would resolve it, but I'm going the opposite route. I want to make sure I don't forget the issue and publish with no caching for everyone when I go public. So for now, I'll live with the problem. I have pushed a copy of my project to Unity Support free tier, and soon expect to have a paid support line, so I'm hoping I'll have a permanent solution in the next few weeks. I'll keep this post updated. :)
     
    Last edited: Aug 13, 2019