Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Detecting if there is lack of disk space before downloading asset bundle (+ Caching.freeSpace bug?)

Discussion in 'Editor & General Support' started by Acrilige, Dec 29, 2015.

  1. Acrilige

    Acrilige

    Joined:
    May 6, 2013
    Posts:
    50
    Hi.

    Caching.freeSpace returns enormous amount of bytes on Unity 5.3.0 (around 9 petabytes, yep!) on both iOS and Android.

    Also, are there any best practices for detecting if it's possible to save assetbundle? Since there might be some difficulties with checking it manually (for example, Android might clean some cache, also there might be SD-card available..)? Or maby Unity already provides an easy way to do that?

    Right now WWW.LoadFromCacheOrDownload just writes this in catlog on Android:

    12-29 15:27:02.473: E/Unity(4277): Failed to write compressed chunk to the archive '/storage/emulated/0/Android/data/com.suchacompany.coolgame/files/UnityCache/Temp/89522f4b0cedf42b1a30b844a258292d/__data'!
     
    MrEsquire likes this.
  2. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    You managed to send Unity a direct bug report?
     
  3. Acrilige

    Acrilige

    Joined:
    May 6, 2013
    Posts:
    50
    Kind of late, but this is turned out to be by design.