Skip to content

Commit

Permalink
update bevy_reflect's module-level doc's "Manual Registration" section
Browse files Browse the repository at this point in the history
  • Loading branch information
eugineerd committed Sep 7, 2024
1 parent 1279d62 commit 74337f7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crates/bevy_reflect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,11 @@
//! For generic methods, the same can be done but will typically require manual monomorphization
//! (i.e. manually specifying the types the generic method can take).
//!
//! ## Manual Registration
//! ## Manual Registration of Generic Types
//!
//! Since Rust doesn't provide built-in support for running initialization code before `main`,
//! there is no way for `bevy_reflect` to automatically register types into the [type registry].
//! This means types must manually be registered, including their desired monomorphized
//! representations if generic.
//! `bevy_reflect` automatically collects all types that derive [`Reflect`] on startup,
//! and [`TypeRegistry::register_derived_types`] can be used to register these types at any point in the program.
//! However, this does not apply to types with generics: their desired monomorphized representations must be registered manually.
//!
//! # Features
//!
Expand Down

0 comments on commit 74337f7

Please sign in to comment.