关于构建AssetBundle哈希冲突的问题

起因:我们在打Bundle 的时候出现了同一个AB里面有相同文件名字的文件(虽然路径不同),具体报错如下:

14:22:18 Building AssetBundle failed because hash collision was detected in the deterministic id generation.
14:22:18 Conflict happened between Asset "Assets/GameAsset/Config/HMT/RofBonus.json" and "Assets/GameAsset/Config/SEA/RofBonus.json

上面报错的两个文件可以看到是文件名相同,文件路径不同。

该报错只有在指定了变体Variant值的时候才会出现。

该BUG在Unity2019.4还未修复:https://issuetracker.unity3d.com/issues/assetbundle-collision-when-building-assetbundles

posted @ 2021-04-19 12:09  何文西  阅读(790)  评论(0编辑  收藏  举报