How to determine validity of cached asset bundle

  1. On launch, check if Asset Bundle is cached using Caching.IsVersionCached. Returns false.
  2. Begin download of Asset Bundle using WWW.LoadFromCacheOrDownload
  3. Close application before download finishes.
  4. Relaunch application. Check if Asset Bundle is cached using Caching.IsVersionCached. Returns true.
  5. Load unfinished asset bundle built with streaming scenes. Attempt to load a scene that was not downloaded. Fail

How do I check if the cached version is valid in step 4? Shouldn’t Caching.IsVersionCached return false?

It would be nice if unity did something like CRC check on the downloaded data but Im not terribly surprised it doesn’t.

I think you have two options:

(1) Write your own CRC check

or

(2) Catch the exception and invalidate the cache, then reload