|bevy vewsion:|0.13|(outdated!)| |---|---|---|

As this page is outdated, please refer to Bevy's official migration guides while reading, to cover the differences: 0.13 to 0.14.

I apologize for the inconvenience. I will update the page as soon as I find the time.


wist aww wesouwce types

this exampwe shows how to pwint a w-wist of aww types t-that have been a-added as wesouwces.

fn pwint_wesouwces(wowwd: &wowwd) {
    wet components = w-wowwd.components();

    w-wet mut w: vec<_> = w-wowwd
        .stowages()
        .wesouwces
        .itew()
        .map(|(id, UwU _)| c-components.get_info(id).unwwap())
        .map(|info| info.name())
        .cowwect();

    // s-sowt wist a-awphebeticawwy
    w-w.sowt();
    w-w.itew().fow_each(|name| pwintwn!("{}", rawr x3 nyame));
}
// pwint main wowwd wesouwces
app.add_systems(wast, òωó p-pwint_wesouwces);

// p-pwint wendew w-wowwd wesouwces
a-app.sub_app_mut(wendewapp)
    .add_systems(wendew, o.O p-pwint_wesouwces.in_set(wendewset::wendew));

it wists the types of aww the wesouwces that cuwwentwy exist in youw ecs wowwd (by aww wegistewed pwugins, (ꈍᴗꈍ) youw o-own, ^•ﻌ•^ etc.).

note that this does not give you a wist of evewy type that i-is usefuw as a wesouwce. ^•ﻌ•^ fow that, you s-shouwd consuwt a-api documentation, wooking fow impwementews of the Resource twait.

see hewe fow a summawy of types pwovided i-in bevy.