-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Objective Fixes #10157 ## Solution Add `AssetMetaCheck` resource which can configure when/if asset meta files will be read: ```rust app // Never attempts to look up meta files. The default meta configuration will be used for each asset. .insert_resource(AssetMetaCheck::Never) .add_plugins(DefaultPlugins) ``` This serves as a band-aid fix for the issue with wasm's `HttpWasmAssetReader` creating a bunch of requests for non-existent meta, which can slow down asset loading (by waiting for the 404 response) and creates a bunch of noise in the logs. This also provides a band-aid fix for the more serious issue of itch.io deployments returning 403 responses, which results in full failure of asset loads. If users don't want to include meta files for all deployed assets for web builds, and they aren't using meta files at all, they should set this to `AssetMetaCheck::Never`. If users do want to include meta files for specific assets, they can use `AssetMetaCheck::Paths`, which will only look up meta for those paths. Currently, this defaults to `AssetMetaCheck::Always`, which makes this fully non-breaking for the `0.12.1` release. _**However it _is_ worth discussing making this `AssetMetaCheck::Never` by default**_, given that I doubt most people are using meta files without the Asset Processor enabled. This would be a breaking change, but it would make WASM / Itch deployments work by default, which is a pretty big win imo. The downside is that people using meta files _without_ processing would need to manually enable `AssetMetaCheck::Always`, which is also suboptimal. When in `AssetMetaCheck::Processed`, the meta check resource is ignored, as processing requires asset meta files to function. In general, I don't love adding this knob as things should ideally "just work" in all cases. But this is the reality of the current situation. --- ## Changelog - Added `AssetMetaCheck` resource, which can configure when/if asset meta files will be read
- Loading branch information
Showing
3 changed files
with
110 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters