#How can I get a list of all the component types?
4 messages · Page 1 of 1 (latest)
i already answered in #general but i'll put this here for completeness sake:
you can use World::components which returns a Components struct over which you can iterate.
https://docs.rs/bevy/latest/bevy/ecs/prelude/struct.World.html#method.components
https://docs.rs/bevy/latest/bevy/ecs/component/struct.Components.html#method.iter
Stores metadata associated with each kind of Component in a given World.
Stores and exposes operations on entities, components, resources, and their associated metadata.
theres a bunch of useful things you can get from the resulting ComponentInfo
https://docs.rs/bevy/latest/bevy/ecs/component/struct.ComponentInfo.html
Stores metadata for a type of component or resource stored in a specific World.
Thank you!!