Skip to main content

concinnity_core/components/
despawn_request.rs

1// src/components/despawn_request.rs
2
3use crate::components::EntityTarget;
4
5/// Runtime-only event requesting that an authored placement be removed from the
6/// world at runtime. A named target needs no live Entity handle; an
7/// entity-addressed one reaches placements that never had a name. GraphicsSystem
8/// reads these from its `Events<DespawnRequest>` queue each step, resolves the
9/// target to its entity, hides that entity's GPU draw slots, and despawns it and
10/// its descendants. World authors never declare this type directly.
11#[derive(Debug, Clone, Copy, Default)]
12pub struct DespawnRequest {
13    /// The placement to remove, by name or entity.
14    pub target: EntityTarget,
15}