Skip to main content

upsert_native_leaves

Function upsert_native_leaves 

Source
pub fn upsert_native_leaves<I>(
    render: &mut World,
    extension_id: &str,
    leaves: I,
)
where I: IntoIterator<Item = (Entity, ExtractedNative)>,
Expand description

Carries one extension’s leaves into the render world, reusing each entity’s render-world entity across frames and despawning the ones that went away.

The lifecycle is scoped to extension_id, so several plugins extracting in the same frame keep their own sets: a plugin only ever retires leaves it produced. Pass the id the leaves carry.