Checksum of bundle does not remain consistent despite no changes...

Hey,

FYI we’re on addressable 1.16.16.

We’re doing some internal management of bundles to keep a track of which bundle(s) has actually changed (ie contents) after triggering an addressable build bundle process by getting CRC on each/every bundle and storing it.

We just noticed some behavior and wanted to confirm this is intentional. Within the same unity editor session, if we build the bundle, the checksum of the bundle remains the same even after executing “Build → Clean Build → All” then building again. ie build bundles, calculate crc, clean all, build bundles, calculate crc. the checksum value will remain the same.

However, this is not the behavior between unity editor session. ie if we build, calculate crc, close/open unity editor, clean all, build, calculate crc, the checksum value seems to change.

Just looking to get some clarity here since we need to be able to track in some way shape or form if the contents of a bundle actually changed since the previous build somehow. And obviously considering the behavior mentioned above with build/cleans between unity editor session, it doesn’t seem like checksum is a viable way.

Thanks in advance

I’ll flag this with the team for some clarification.

Sounds like a bug. I was able to reproduce on my end, I noticed though that the checksum is the same if you don’t do the clean all step.

I don’t know of another really convenient way to check if bundle contents are the same, but you can do it with WebExtract.exe and binary2text under PathToUnity\Unity\Hub\Editor\2020.2.1f1\Editor\Data\Tools. First WebExtract.exe pathtomybundle.bundle, then binary2text.exe resultingdir/newbin and diff the resulting text files. I opened a ticket for this bug, but in the meantime you could try that, or consider taking the clean build step out.

Thanks for the update, will take that into consideration