一键导入
bevy-plugins
Reference for Bevy plugins — function plugins, Plugin trait, life-cycle, ordering, configuration, PluginGroup, DefaultPlugins, and MinimalPlugins.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reference for Bevy plugins — function plugins, Plugin trait, life-cycle, ordering, configuration, PluginGroup, DefaultPlugins, and MinimalPlugins.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Reference for Avian physics engine — rigid bodies, colliders, joints, spatial queries, collision events, character controllers, and debug rendering.
Reference for loading, managing, and tracking assets in Bevy — AssetServer, handles, loading states, events, custom loaders, and hot reloading.
Reference for playing and controlling audio in Bevy — AudioPlayer, AudioSink, spatial audio, volume, and playback settings.
Reference for Bevy Scene Notation (BSN) — the bsn! macro for defining inline scenes with components, children, relationships, observers, and dynamic props.
Reference for cameras in Bevy — Camera2d, Camera3d, viewports, projection, render layers, mouse-to-world, and free camera controllers.
Reference for Bevy Commands — spawning/despawning entities, inserting/removing components, custom commands, trait extensions, and testing.
| name | bevy-plugins |
| description | Reference for Bevy plugins — function plugins, Plugin trait, life-cycle, ordering, configuration, PluginGroup, DefaultPlugins, and MinimalPlugins. |
| metadata | {"crate":"bevy_app","bevy":"0.19"} |
fn my_plugin(app: &mut App) {
app.add_systems(Startup, setup);
}
app.add_plugins(my_plugin);
pub struct CameraPlugin;
impl Plugin for CameraPlugin {
fn build(&self, app: &mut App) {
app.add_systems(Startup, setup);
}
fn cleanup(&self, _app: &mut App) {
// clean up resources
}
}
Lifecycle: build → ready (polled) → cleanup.
Plugins run in the order added. Duplicate plugins panic by default:
if !app.is_plugin_added::<MyPlugin>() {
app.add_plugins(MyPlugin);
}
pub struct CameraPlugin { debug: bool }
impl Plugin for CameraPlugin {
fn build(&self, app: &mut App) {
if self.debug { /* extra setup */ }
}
}
app.add_plugins(CameraPlugin { debug: true });
Group related plugins and allow later configuration:
pub struct GamePlugins;
impl PluginGroup for GamePlugins {
fn build(self) -> PluginGroupBuilder {
PluginGroupBuilder::start::<Self>()
.add(CameraPlugin::default())
.add(PhysicsPlugin::default())
}
}
app.add_plugins(GamePlugins.build().disable::<PhysicsPlugin>());
Everything needed for a typical Bevy app — windowing, input, audio, rendering, UI, scenes, assets, time, transforms, etc. (feature-gated, enabled by default).
Bare essentials: TaskPoolPlugin, FrameCountPlugin, TimePlugin, ScheduleRunnerPlugin. Useful for tests and headless apps.