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. Dismiss Notice

Resolved Archive file was modified while it was opened

Discussion in 'Asset Bundles' started by vectorized-runner, Jun 19, 2023.

  1. vectorized-runner

    vectorized-runner

    Joined:
    Jan 22, 2018
    Posts:
    383
    I couldn't find anything online about this error:

    Archive file was modified while it was opened, and can no longer be accessed: [Bundle Path]


    does it happen if we overwrite to a loaded texture or something?
     
  2. AndrewSkow

    AndrewSkow

    Unity Technologies

    Joined:
    Nov 17, 2020
    Posts:
    78
    I'm not familiar with cases where this can appear, but from looking at the code I can see that this error would be logged if a AssetBundle file (e.g. Unity Archive file format) is detected to have a changed modified time during the process of loading. Is it possible the file is being written to, for example in the process of downloading, and is being opened too soon?
     
  3. vectorized-runner

    vectorized-runner

    Joined:
    Jan 22, 2018
    Posts:
    383
    Hi, I think this was caused by calling AssetBundle.LoadFromFile for the same path multiple times somewhere in our code. We've updated the code to properly cache the opened bundles.
     
  4. zhouzhanglin

    zhouzhanglin

    Joined:
    Jan 19, 2021
    Posts:
    1
    Archive file was modified while it was opened, and can no longer be accessed: /idbfs/6b1c3afb440187f9c62d42ab1160ba17/UnityCache/Shared/minerfemale_01_44b54bca7688bbf6909f201bf7d25403/00000000000000000000000001000000/__data

    Same mistake. I don't know how it was caused.