johanhelsing / bevy_web_asset

Bevy asset loader that transparently supports loading over http(s)
Apache License 2.0
71 stars 17 forks source link

Cannot load gltf asset with `bevy_glft` loader #31

Open DefectingCat opened 3 weeks ago

DefectingCat commented 3 weeks ago

When load a gltf asset, bevy will use crate bevy_glft and its loader.

    app.add_plugins((
        WebAssetPlugin,
        DefaultPlugins.set(WindowPlugin {
            primary_window: Some(Window {
                title: "test".to_string(),
                ..default()
            }),
            ..default()
        }),
    ))
    let scene_path =
        "http://192.168.1.16:8074/public/uploads/manual/models/juese_c/model.gltf#Scene0";
    commands.spawn(SceneBundle {
        scene: asset_server.load(scene_path),
        ..default()
    });

It seems load model.gltf with correct path, but bevy_glft loader cannot use the correct path to load model.bin

2024-08-21T01:22:14.263363Z ERROR bevy_asset::server: Failed to load asset 'http:
//192.168.1.16:8074/public/uploads/manual/models/juese_c/model.gltf' with asset l
oader 'bevy_gltf::loader::GltfLoader': failed to read bytes from an asset path: P
ath not found: /home/xfy/pl/Developer/mower/assets/192.168.1.16:8074/public/uploa
ds/manual/models/juese_c/model.bin