Update AssetRegistryDependencyDataOffset when any table size changes#121
Update AssetRegistryDependencyDataOffset when any table size changes#121drcxd wants to merge 7 commits intoatenfyr:masterfrom
Conversation
There is an offset stored in AssetRegistryData, the AssetRegistryDependencyDataOffset. It is not correctly updated if any table precedes it has expanded or shrunk. See ReadPackageDataMain and WritePackageData in Unreal Engine code for more detail about this offset. This patch may not work for all cases, since it does not replicate the computation of the offset. It is based on the assumption that the difference between AssetRegistryDataOffset and AssetRegistryDependencyDataOffset usually does not change.
|
looks good at a glance, will merge if you can do me a favor and double check that all tests still pass with your changes |
|
Hello, I have updated the condition for reading/writing asset registry dependency data to fix some tests, but there is still some problems. The failing test is To fix this problem, we have to either change the condition for determining if the asset contains asset registry dependency data or change the version mapping. I can't see how to do either properly, can you give some advice? The current condition is based on the following engine code, I am working with Unreal Engine 5.1: |
|
It came to me that I can see how Unreal Engine read the asset, so in I updated the code as above and passed all 20 tests. |
There is an offset stored in AssetRegistryData, the AssetRegistryDependencyDataOffset. It is not correctly updated if any table precedes it has expanded or shrunk. See ReadPackageDataMain and WritePackageData in Unreal Engine code for more detail about this offset. This patch may not work for all cases, since it does not replicate the computation of the offset. It is based on the assumption that the difference between AssetRegistryDataOffset and AssetRegistryDependencyDataOffset usually does not change.