Derive Macro bevy_reflect::FromReflect

source ·
#[derive(FromReflect)]
{
    // Attributes available to this derive:
    #[reflect]
}
Expand description

Derives the FromReflect trait.

This macro supports the following field attributes:

  • #[reflect(ignore)]: Ignores the field. This requires the field to implement Default.
  • #[reflect(default)]: If the field’s value cannot be read, uses its Default implementation.
  • #[reflect(default = "some_func")]: If the field’s value cannot be read, uses the function with the given name.