bevy_entity_graph 0.1.0

Create graphs of entities in the Bevy game engine..
Documentation

bevy_entity_graph

License Crates.io Docs

Crate to facilitate working with graphs of entities in Bevy.

Features:

  • Event-driven graph modifications.
  • Auotmatically updated connected component tracking.

Usage

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

bevy bevy_entity_graph
0.16 0.1.0