Open andriyDev opened 4 hours ago
what about being used here for hashing? https://github.com/moOsama76/bevy/blob/6963b58eba4fa7d8cc73389f57699ed31a8216d4/crates/bevy_asset/src/loader.rs#L542
what about this variable using it?
This doesn't seem to be linking to anything meta related? Not sure if I'm misunderstanding
what about being used here for hashing?
That meta usage is the same Box<dyn AssetMetaDyn>
that gets passed in to the loader. So instead of computing the hash based on the meta from the loaded asset, we can just store the hash based on the meta we pass in. As far as I can tell, there's no way for us to change the meta, so there's no way for the hash to be different.
I think you are correct
What problem does this solve or what need does it fill?
This field is (nearly) unused, and inaccessible. It adds more conceptual overload for no advantage.
What solution would you like?
Delete the field!
Additional context
This may be planned feature work, but I don't think so. Subassets having metadata doesn't make much sense as far as I can tell, and the root asset has its metadata passed in and it isn't changed. The only part that's a little confusing is the
populate_hashes
argument, but that only affects the loader dependencies, not the asset'smeta
field.