Search Issue Tracker
By Design
Votes
0
Found in
2017.4.9f1
Issue ID
1070406
Regression
Yes
[Windows] Caching.ClearCachedVersion() and Caching.ClearAllCachedVersions() fails to remove Bundle from Cache
To reproduce:
1. Download attached project "CachingBug.zip" and open in Unity
2. Open "Main" scene
3. Open "CacheDemo01" script, comment 90 line and save it
4. Enter Play mode
5. Observe in Console that Caching.ClearCachedVersion() fails to remove bundle from cache
6. Exit Play mode
7. Open "CacheDemo01" script, uncomment 90 line, comment 89 line and save it
8. Enter Play mode
9. Observe in Console that Caching.ClearAllCachedVersions() fails to remove bundle from cache
Notes:
- This issue appears only on Windows
- This issue does not reproduce on OSX
Reproduced on Unity 2017.3.1p3, 2017.3.2f1, 2017.4.9f1, 2018.1.9f1, 2018.2.3f1 and 2018.3.0a9
Not reproduced on Unity 2017.2.3p3 and 2017.3.1p2
Regression on Unity 2017.3.1p3
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
- "NullReferenceException" is thrown when setting a long string in TMP with "Atlas Population Mode" set to "Dynamic" and "Multi Atlas Textures" enabled
- TextMeshPro text is misaligned when alignment is set via script
- A DX11 shader error is thrown when compiling shaders for platforms without DX11 support
- Rigidbody2D.Slide correctly ignores colliders specified with "Physics2D.IgnoreCollision" however encountering them can still modify movement behaviour in subtle ways.
- [Quality Hackweek] A black separator appears when the left panel in the UI Builder tab is resized, and the tab is narrow
Resolution Note (2017.4.X):
1. You need to use `UnityWebRequestAssetBundle` since `WWW` isn't supported and doesn't save the correct cache path anymore due to an issue with it not using the correct hash. UWR does.
2. You have to unload their bundle before they can clear their cache. It can't work otherwise. That said there is an odd issue where if they've downloaded the bundle/cached it with UWR but not loaded it through the `DownloadHandlerAssetBundle.GetContent` API then `AssetBundle.UnloadAllAssetBundles(bool)` won't actually unload the bundle. They have to get the bundle from UWR and make sure it's unloaded.
3. You're giving the asset bundle name as a path `abm/examples/unitylogo` because that's the path from StreamingAssets down to their bundle on disk. You can't give that same path to `Caching.LiterallyAnyAPI` because it only caches based on the name itself (and the path of the cache of course), not any sort of given path.