Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback [v0.6.8] The cached catalog Hash file is unavailable.

Discussion in 'Addressables' started by yuweichang, Apr 16, 2019.

  1. yuweichang

    yuweichang

    Joined:
    Nov 22, 2018
    Posts:
    6
    Hello,
    I just found that the system always downloads the same catalog file from the server when using the remote catalog, so I made an investigation into the source code.

    I think it's due to the unnecessary file extension in this version. (the same problem is found in v0.6.7)
    The InternalId for a hash file is catalog_******.json.hash, but the cached hash file name is catalog_******.hash.hash. Hence the TextDataProvider can never find and read the cached file.
    Hope this will be fixed in the future.

    The following are corresponding source codes:
    BuildScriptPackedMode.cs#300:
    var versionedFileName = aaSettings.profileSettings.EvaluateString(aaSettings.activeProfileId, "/catalog_" + playerVersion + ".json");
    (i.e. /catalog_******.json)

    BuildScriptPackedMode.cs#314:
    var remoteHashBuildPath = remoteBuildFolder + versionedFileName + ".hash";
    (i.e. [folder]/catalog_******.json.hash)


    ContentCatalogProvider.cs#109:
    File.WriteAllText(localCachePath.Replace(".json", ".hash"), m_HashValue);
    (i.e. [path]/catalog_******.hash.hash)
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Thanks. The extra hash should be cleared up in the upcoming release