unity config_error ai_generated true

UnityEngine.AddressableAssets:初始化失败:内容目录哈希不匹配。预期为 'abc123',实际为 'def456'。

UnityEngine.AddressableAssets: Initialization failed: Content catalog hash mismatch. Expected 'abc123', got 'def456'.

ID: unity/addressables-catalog-hash-mismatch

其他格式: JSON · Markdown 中文 · English
85%修复率
82%置信度
1证据数
2023-11-05首次发现

版本兼容性

版本状态引入弃用备注
1.21.17 active
1.22.0-pre.2 active

根因分析

本地可寻址内容目录哈希与远程目录哈希不匹配,表示本地缓存已过时或损坏。

English

The local addressables content catalog hash does not match the remote catalog hash, indicating a stale or corrupted local cache.

generic

官方文档

https://docs.unity3d.com/Packages/[email protected]/manual/InitializeAsync.html

解决方案

  1. Clear the Addressables cache at runtime: `Caching.ClearCache(); Addressables.InitializeAsync();`
  2. In the Editor, go to Windows > Asset Management > Addressables > Settings and click 'Clean Build' > 'All' to rebuild both local and remote catalogs.
  3. Manually delete the catalog cache folder at `{persistentDataPath}/com.unity.addressables/` then reinitialize.

无效尝试

常见但无效的做法:

  1. 90% 失败

    The hash mismatch is between local and remote catalogs; deleting settings removes the entire configuration, not just the cache.

  2. 95% 失败

    Addressables uses its own cache in Application.persistentDataPath, not the browser cache; clearing browser cache has no effect.

  3. 60% 失败

    Reimporting builds a new local catalog but doesn't update the remote catalog; the mismatch persists if remote hasn't been rebuilt.