Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssetServer load docs should state that assets don't get loaded multiple times #13823

Open
torsteingrindvik opened this issue Jun 12, 2024 · 0 comments
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Docs An addition or correction to our documentation D-Straightforward Simple bug fixes and API improvements, docs, test and examples

Comments

@torsteingrindvik
Copy link
Contributor

How can Bevy's documentation be improved?

http://dev-docs.bevyengine.org/bevy/asset/struct.AssetServer.html#method.load

When doing a pattern such as in many_foxes.rs:

    let animation_clips = [
        asset_server.load(GltfAssetLabel::Animation(2).from_asset("models/animated/Fox.glb")),
        asset_server.load(GltfAssetLabel::Animation(1).from_asset("models/animated/Fox.glb")),
        asset_server.load(GltfAssetLabel::Animation(0).from_asset("models/animated/Fox.glb")),
    ];

I feel quite sure that reading the fox file from disk happens once and not three times.
To be very sure I checked docs, but they don't explicitly state this behavior.

So I'd like docs to clear up:

  • When calling load on the same path several times, how many times is the asset loaded from disk
  • When calling load on the same path several times with different labels (#this-type-of-label), will this still only load once from disk
@torsteingrindvik torsteingrindvik added C-Docs An addition or correction to our documentation S-Needs-Triage This issue needs to be labelled labels Jun 12, 2024
@mnmaita mnmaita added A-Assets Load files from disk to use for things like images, models, and sounds D-Straightforward Simple bug fixes and API improvements, docs, test and examples and removed S-Needs-Triage This issue needs to be labelled labels Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Docs An addition or correction to our documentation D-Straightforward Simple bug fixes and API improvements, docs, test and examples
Projects
None yet
Development

No branches or pull requests

2 participants