bevy_asset_loader icon indicating copy to clipboard operation
bevy_asset_loader copied to clipboard

texture_atlas_layout not work with ron

Open darkautism opened this issue 1 month ago • 0 comments

fn main() {
    App::new()
        .init_state::<MyStates>()
        .add_plugins(DefaultPlugins)
        .add_plugins(RonAssetPlugin::<Story>::new(&["novel.ron"]))
        .add_loading_state(
            LoadingState::new(MyStates::AssetLoading)
                .continue_to_state(MyStates::Next)
                .with_dynamic_assets_file::<StandardDynamicAssetCollection>(
                    "test.assets.ron",
                )
                .load_collection::<MyAssets>(),
        )
        .run();
}

#[derive(AssetCollection, Resource, Debug)]
struct MyAssets {
    #[asset(key = "storys", collection(typed))]
    pub storys: Vec<Handle<Story>>,

    #[asset(texture_atlas_layout(tile_size_x = 960., tile_size_y = 200., columns = 5, rows = 3))]
    pub npc_dialog_textarea: Handle<TextureAtlasLayout>,
}

It will response

thread 'main' panicked at C:\Users\kautism\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_asset_loader-0.20.1\src\standard_dynamic_asset.rs:242:30:
No Handle for path

If remove TextureAtlasLayout, It not happened.

darkautism avatar May 07 '24 02:05 darkautism