Add support for loading sub-assets as if they were separate files. #6504
+189
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
The current
AssetServer
system does not support loading assets from inside of container assets that have no way of knowing what they might contain such as zip files or Doom-style WAD files. This aims to add support for this style of asset storage.Fixes #3319
Solution
This implementation adds a way to defer loading internal assets (a.k.a. sub-assets) from a container asset's (a.k.a. super-asset)
AssetLoader
. These deferred loads are then loaded using the existingAsset
loading system once the container asset'sAssetLoader
returns.This system required changes to the existing
AssetPath
to allow the system to determine both the sub-asset's path forAsset
IDs and to determine the rightAssetLoader
and the super-asset path to determine the file on the filesystem backing the sub-asset.Changelog
Added
AssetPath
AssetLoader