Is there a way to obtain CRC code for each asset within a bundle? When I reload a bundle I would like to know what has changed. Is there some kind of accessible metadata stored per asset?
A CRC wouldn’t apply or be useful here, it just checks data integrity. Since it is bundled contents, you could do a CRC on the bundle, but individually the contents would serve a purpose. If bundle itself is intact, so the are contents.
Checking for differences automatically wouldn’t be practical. If you (the developer) change the asset, the client (the game), would just see the new version next time it needs to access it. I guess you could store updates as new unique bundles, but that would be kind of headache to maintain and manage. It also kind of contradicts the primary use case for assetbundles, in that you can just update and manage them and the game doesn’t care.
Really though if you just need to see what has been added or changed or really any other information you want to pass to the client, just include a text/xml/json file in bundle or, put it in an array or list on a script in a gameobject included in the bundle. (my preference) You can store any info you want that way.
Just like I thought… I have to implement it myself. I need this for fast asset reload upon bundle change. Currently when I update one asset and rebuild a bundle then I don’t know which asset changed.
It’s obvious to me that bundles should have an option to keep per asset importing metadata. It’s ridiculous that when for ex. I load an image I can’t even check it’s resolution beforehand.
Why are asset bundle paths all lowercase? I don’t get it. It’s annoying.
That’s really more of a pipeline/process issue. Import settings and such is editor side. Assetbundles are designed as a way to deliver game ready content. The flow is that you are loading specific content, not unknown content. For multiple resolutions, you can use bundle variants, or just have multiple bundles and load them conditionally (by platform or device specifics or whatever).
Broader compatibility if I recall. It was change in 5 (or thereabouts).
I think its a good strategy to implement only what is absolutely necessary and leaving options to build upon that. Maybe it’s not so bad after all…
I have some strong opinions about how engines should be made. Old engines were simply a bunch binary files and a pile of C/C++ headers. In Unity you need editor for everything. I would like to do EVERYTHING through code. When I see import metadata in the editor I would like to have an API to read it on my own and include it in my builds.
I need that metadata since I want to support mods through bundles. In such case you need a lot of asset validation since modders can mess much.