// Attributes available to this derive:
Expand description

Implements ExtractComponent trait for a component. The component must implement [Clone]. The component will be extracted into the render world via cloning. Note that this only enables extraction of the component, it does not execute the extraction. See ExtractComponentPlugin to actually perform the extraction.

If you only want to extract a component conditionally, you may use the extract_component_filter attribute.


use bevy_ecs::component::Component;
use bevy_render_macros::ExtractComponent;

#[derive(Component, Clone, ExtractComponent)]
pub struct Foo {
    pub should_foo: bool,

// Without a filter (unconditional).
#[derive(Component, Clone, ExtractComponent)]
pub struct Bar {
    pub should_bar: bool,