Skip to content

Attempting to load a GltfPrimitive directly from a file path causes it to be stuck loading forever. #17661

Open
@rydb

Description

Bevy version

0.15.1

What you did

I attempted to load a gltf primitive with:

primitive.0 = Some(asset_server.load("cube.glb#Mesh0/Primitive0"));

However, the asset will never finish loading.

let path = handle.path().unwrap();

match asset_server.load_state(handle) {
    bevy::asset::LoadState::NotLoaded => println!("not loaded {:#}", path),
    // perpetually stuck loading here, but no error from the asset loader about being an invalid asset?
    bevy::asset::LoadState::Loading => {
        println!("loading {:#?}", path)
    }
    bevy::asset::LoadState::Loaded => {
        println!("loaded {:#}", path);
        primitive.0 = None;
    }
    bevy::asset::LoadState::Failed(asset_load_error) => {
        println!("failed to load {:#}. REASON: {:#}", path, asset_load_error)
    }
}

I re-created a minimal example of the bug at the repo here:
https://github.com/rydb/bug_example

Metadata

Assignees

No one assigned

    Labels

    C-BugAn unexpected or incorrect behaviorS-Needs-TriageThis issue needs to be labelled

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions