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

texture_atlas_layout not work with ron #211

Open
darkautism opened this issue May 7, 2024 · 0 comments
Open

texture_atlas_layout not work with ron #211

darkautism opened this issue May 7, 2024 · 0 comments

Comments

@darkautism
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant