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:
    204
    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:
    12
    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:
    204
    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
    feiniudaxia likes this.
  4. DanVioletSagmiller

    DanVioletSagmiller

    Joined:
    Aug 26, 2010
    Posts:
    204
    I received back that it was fixed in 1.1.10. However, now that I had a chance to revisit this issue, the caching issue is still happening. As a side note, my JS and Unity have no direct ties to web caching via my code, only the Unity tools already using it. (Addressables/asset loading)
     
  5. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    Hey @DanVioletSagmiller yeah this has been a problem for a while. The fix for this has actually just gone into our master branch and will be fixed as of our next release (1.3.1 I believe).
     
    DanVioletSagmiller likes this.
  6. Rarceth

    Rarceth

    Joined:
    Oct 15, 2015
    Posts:
    41
    hey @DavidUnity3d , do we have a timeline on the 1.3.1 release?
     
  7. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    Hey @Rarceth we're targeting by the end of next week if everything goes well.
     
    DanVioletSagmiller likes this.
  8. tony040209_unity

    tony040209_unity

    Joined:
    Mar 21, 2021
    Posts:
    28
    @davidla_unity
    Hello, Is this issue resolved?
    I've found that WebGL tends to load old .bundle files.

    Unity2021.3.8f1

    Addressables 1.19.19
     
    Last edited: Mar 5, 2024
  9. C0lonnello

    C0lonnello

    Joined:
    Nov 7, 2022
    Posts:
    30
    Up I'm having the same issue
     
  10. MykolaKhimich

    MykolaKhimich

    Joined:
    Nov 9, 2023
    Posts:
    1
    Yeah, same here.