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

Asset Bundles

-

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

  1. 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.

Comments (3)

  1. BerniceBode

    May 11, 2019 08:02

    I am pretty happy to read the steps to follow for successful caching of Windows. Many of my problems got resolved with the help of www.studytonight.com/post/best-programming-languages-to-learn-in-2019 website which has big reputation in the world of student's help.

  2. solitairegamesfree

    Apr 05, 2019 08:03

    if you face trouble to get it then here on just single click http://alarmsinwindows10.com you will learn that where are alarms in windows 10 operating system.

  3. solitairegamesfree

    Apr 05, 2019 08:02

    xZ

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.