Skip to content

Assets as asset sources for labeled assets #25517

Description

@ewmb7701

What problem does this solve or what need does it fill?

We cannot lazily load labeled assets from so-called "random access" root assets such as archives (see #21641). Currently all labeled assets must be eagerly loaded when the root asset is loaded.

What solution would you like?

I would like an LabeledAssetReader so that I can register a root asset as an asset source for labeled assets. I'm not sure about the API but ultimately I would like to lazy load a labeled asset. eg, I would like asset_server.load("Fallout New Vegas/Data/FalloutNV - Textures2.bsa#textures\\interface\\main\\main_title.dds"); to read some bytes from a BSA root asset via BsaLabeledAssetReader which defers to ImageLoader.

What alternative(s) have you considered?

Asset sources (and especially runtime asset sources, see #21758) indeed solves this issue; I was able to move forward by loading the "random access" root assets outside the asset system and using those "random access" root assets in an asset reader. However I'm not satisfied with this alternative because it circumvents the asset system.

Additional context

I am working with Bethesda Software Archive (BSA) data files which contain an index with file records with the offset of files within the archive. This is pretty typical for so-called "random access" root assets. As I mentioned in an earlier section, I implemented a bsa:// asset source.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsC-FeatureA new feature, making something new possibleS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedX-ContentiousThere are nontrivial implications that should be thought through

    Type

    No type

    Projects

    • Status
      Needs SME Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions