Skip to content

Support bundling assets #606

Open
Open

Description

The code that loads a PNG file into a Texture seems to be tightly coupled with the AssetServer's system for loading from the filesystem. It would be good to be able to use include_bytes! to bundle the file content but still take advantage of Bevy's support for loading assets of various types. It would be sufficient to add a method such as:

fn read_asset<P: AsRef<Path>, R: Read>(path: P, reader: R) -> HandleId { ... }

or even:

fn load_in_memory_asset<P: AsRef<Path>>(path: P, data: &[u8]) -> HandleId { ... }

Activity

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

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 possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    • Status

      Wishlist

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions