Search Issue Tracker
By Design
Votes
0
Found in
2022.3.48f1
6000.0.21f1
Issue ID
UUM-82616
Regression
No
Addressable bundles are not retrieved from the cache when a WebGL Player is refreshed
Reproduction steps:
1. Open the attached "repro_IN-84798" project
2. Go to "File → Build Settings..." (or "Build Profiles" on Unity 6)
3. Switch platform to "WebGL"
4. Add the "Scenes/SampleScene.unity" Scene to the build index and press "Build And Run"
5. Once the Player opens, press the right button anywhere on your browser and select "Inspect"
6. Open the "Network" tab
7. In the Player, click the "Button" button and wait for all of the addressables bundles to be downloaded
8. Once they're downloaded, refresh the browser page
9. In the Player, click the "Button" button again
10. Observe the traffic in the "Network" tab
Expected result: Addressable bundles are retrieved from the cache
Actual result: Addressable bundles are redownloaded with a new network request
Reproducible with: 2022.3.48f1, 6000.0.21f1
Couldn't test with: 2021.3.44f1 - "RuntimeError: null function or function signature mismatch error is thrown" each time the button is pressed
Reproducible on: macOS 14.6.1 (user's), Windows 10 (22H2)
Not reproducible on: No other environments tested
Note: Reproducible on Google Chrome (129.0.6668.58), Mozilla Firefox (130.0.1), Opera (113.0.5230.86)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
- Group Node name text is way smaller in the renaming state than the actual display size
Resolution Note:
The caching of Addressables and AssetBundles is working as designed when hosted on a web server such as Apache, nginx, ISS, node http-server,... Refer to this page for more information on how to configure a web server to host Unity web builds: https://docs.unity3d.com/Manual/webgl-server-configuration-code-samples.html
The web server will need to set the "Last-Modified-At" response header and support "If-Modified-Since" request headers for the revalidation of cached files to work(most servers support this by default).
The reported bug is only reproducible when hosted using the "Build & Run" feature of the Unity editor. The root cause is that the Unity Editor uses a very simple web server with only basic support for hosting websites as outlined here: https://docs.unity3d.com/Manual/webgl-technical-overview.html