Expand description
§Bevy Gameplay Tag
A powerful and flexible hierarchical gameplay tag system for the Bevy game engine, inspired by Unreal Engine’s Gameplay Tag system.
§Features
- Hierarchical Tag System: Create parent-child tag relationships (e.g.,
Ability.Skill.Fire) - Flexible Matching: Support for both exact and hierarchical tag matching
- Reference Counting: Track tag counts with automatic event notifications
- Complex Queries: Build sophisticated tag queries with boolean logic
- Event-Driven: Observer pattern for responding to tag changes
- JSON Configuration: Define your tag hierarchy in external JSON files
- High Performance: Optimized with string interning and binary search
§Quick Start
use bevy::prelude::*;
use bevy_gameplay_tag::{GameplayTagsPlugin, GameplayTag, GameplayTagCountContainer};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(GameplayTagsPlugin::default())
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn(GameplayTagCountContainer::new());
}§Core Types
GameplayTag: Immutable tag identifier with hierarchical matchingGameplayTagContainer: Collection of tags with query capabilitiesGameplayTagCountContainer: Reference-counted tags with event notificationsGameplayTagsManager: Global resource managing the tag hierarchyGameplayTagsPlugin: Bevy plugin for initialization
§Examples
See the examples directory for complete working examples.
Re-exports§
pub use gameplay_tag::GameplayTag;pub use gameplay_tag_container::GameplayTagContainer;pub use gameplay_tag_container::GameplayTagQuery;pub use gameplay_tag_container::GameplayTagQueryExpression;pub use gameplay_tag_count_container::GameplayTagCountContainer;pub use gameplay_tag_count_container::GameplayTagEventType;pub use gameplay_tag_count_container::OnGameplayEffectTagCountChanged;pub use gameplay_tag_requirements::GameplayTagRequirements;pub use gameplay_tags_manager::GameplayTagsManager;pub use gameplay_tags_manager::GameplayTagsSettings;pub use gameplay_tags_plugin::GameplayTagsPlugin;