Skip to content

Remove the load_folder API #19727

Open
Open
@alice-i-cecile

Description

@alice-i-cecile

Originally posted by @andriyDev in #19717 (comment):

@alice-i-cecile I am against the load_folder API. I think my ideal API is something like this:

struct LoadBatchRequest {
    requests: Vec<Glob>,
}

So you could do:

vec![
    "my_mesh.gltf",
    "animations/walk_*.png",
    "animations/run_*.png",
    "particles/*",
]

We can even make this itself an asset, so you'd just do asset_server.load::<LoadedBatch>("my_load_request.batch.ron");. I think this allows us to be more targeted and is generally more flexible. You can still do folder loads, but you can also target specific file paths.

I would prefer not to merge this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedX-ControversialThere is active debate or serious implications around merging this PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions