# `bevy_entity_graph`
[](https://github.com/Katsutoshii/bevy_entity_graph#license)
[](https://crates.io/crates/bevy_entity_graph)
[](https://docs.rs/bevy_entity_graph/latest/bevy_entity_graph/)
Crate to facilitate working with graphs of entities in Bevy.
Features:
- Event-driven graph modifications.
- Auotmatically updated connected component tracking.
## Usage
```rs
use bevy_entity_graph::{ConnectEvent, Connections, EntityGraphPlugin, InConnectedComponent};
fn my_system(mut commands: Commands, mut connect_events: EventWriter<ConnectEvent>) {
// Spawn some entities with Connections.
let e1 = commands.spawn((Connections::default(), ...)).id();
let e2 = commands.spawn((Connections::default(), ...)).id();
// Connect them.
connect_events.write(ConnectEvent((e1, e2)));
}
```
See `examples` for a working demo.
## Bevy support table
| 0.16 | 0.1.0 |