bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
36.4k stars 3.59k forks source link

`World::init_component` docs do not explain that components are generally automatically initialized #16447

Open alice-i-cecile opened 5 days ago

alice-i-cecile commented 5 days ago

How can Bevy's documentation be improved?

init_component is used to register components for use. However, when using systems, components are automatically registered when the system is initialized.

This was spotted when reviewing https://github.com/bevyengine/bevy/pull/16434, which suggests that you call this method if World::try_query fails.